1

I've implemented a class inheriting form UIViewController. I used xib editor to create the portrait orientation of the Titlebar and Toolbar and those rotate correctly when I rotate the iPad. However I have a MPMoviePlayerController which I want to resize manually using this method:

-(void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
    _mvp.view.frame = CGRectMake(_titlebar.frame.origin.x , _titlebar.frame.origin.y + _titlebar.frame.size.height , _titlebar.frame.size.width , super.view.frame.size.height  - 2* 44); 
    [_mvp stop];
}

_mvp is my MPMoviePlayerController. I resize using this method earlier in the app and have no issue so I don't understand why this method isn't called? (as the movie also continues playing) I have implemented shouldAutoRotateToInterfaceOrientation to return YES - does that prevent this being run in any way?

Thanks

LonelyCat
  • 43
  • 7

1 Answers1

0

It could be because you have a parent controller that does not manually pass the method call from didRotateFromInterfaceOrientation to the child controllers. If you use a UINavigationController or UITabBarController as your parent controller, you should take a look here.

Also make sure to return YES to shouldAutorotateToInterfaceOrientation from all of your subviews.

Your assumption of setting shouldAutoRotateToInterfaceOrientation to return YES will not prevent didRotateFromInterfaceOrientation from being run.

Hope this helps a little.

Community
  • 1
  • 1
Yannick
  • 1,076
  • 1
  • 11
  • 23