I used this code in iOS 7 and worked fine, but in iOS 8 it doesn't work
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeFinished:) name:@"UIMoviePlayerControllerWillExitFullscreenNotification" object:nil];
-(void)youTubeStarted{
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
appDelegate.fullScreenVideoIsPlaying = YES;
}
-(void)youTubeFinished{
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
appDelegate.fullScreenVideoIsPlaying = NO;
}
I tried changing the UIMoviePlayerControllerDidEnterFullscreenNotification to MPMoviePlayerWillEnterFullscreenNotification. No luck
Anyway to do this?
EDIT
See what happens, I think, with iOS 8.1 using NorthBlast's answer. It worked great with iOS 8.0 and iOS 8.0.2

source
share