• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MPMoviePlayerViewController orientation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: MPMoviePlayerViewController orientation
      • From: Rainer Standke <email@hidden>
  • Prev by Date: Core Data Sequence Problem
  • Next by Date: Re: Iphone view from object not from controller.
  • Previous by thread: Re: Core Data Sequence Problem
  • Next by thread: Re: MPMoviePlayerViewController orientation
  • Index(es):
    • Date
    • Thread