i’ve added this code in my ViewController.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
if (interfaceOrientation != UIInterfaceOrientationPortrait) {
[self.moviePlayerController setFullscreen:YES animated:YES];
}
return YES;
}
So after rotation my player plays video in fullscreen mode. I need to catch rotation event in playerController (OrientationPortrait) to setFullScreen:NO.
How can I do this?
Thanks for answers.
The setting of orientation of moviePlayerController should not be handled in this function.
Add a notifier in the viewWillAppear function
The orientation change notifies this function
which in-turn calls this function where the moviePlayerController frame is orientation is handled
in viewDidDisappear remove the notification