MPMoviePlayerViewController orientation
MPMoviePlayerViewController orientation
- Subject: MPMoviePlayerViewController orientation
- From: Rainer Standke <email@hidden>
- Date: Wed, 20 Oct 2010 13:36:15 -0700
Hello,
I have an iPhone project where I am using an MPMoviePlayerViewController to display a movie. It is initialized with a URL, and the movie does indeed start playing, in portrait orientation.
I want this to happen in landscape orientation, ideally doing autorotations.
In my subclass of MPMoviePlayerViewController I have this method:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"rotating to: %d", interfaceOrientation);
NSLog(@"device orient: %d", [[UIDevice currentDevice] orientation]);
NSLog(@"UI orient: %d", self.interfaceOrientation);
NSLog(@"generatesDeviceOrientationNotifications: %d", [[UIDevice currentDevice] isGeneratingDeviceOrientationNotifications]);
return YES;
}
This method does get called when I rotate the device away from portrait, in which it first appears. The UI orientation never changes away from 1 = portrait.
I have also implemented this:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
NSLog(@"will rotate");
}
This does get called, but the UI rotation never happens.
What can I do to get a) the movie to play in landscape, and b) the UI to autorotate?
Thanks a lot,
Rainer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden