I have a button that displays a UIWebView and then broadcasts a video from YouTube. On the iphone, it works fine, and pressing the play button goes directly to full screen mode, and then when it is finished pressing this button hides the UIWebView and returns control to the application.
However, when I try to do the same on the iPad, clicking on playback does not automatically go into full screen mode (you can get into full screen mode, but I donβt want users to have this option) - is there a way to do this, please?
The code I have is:
- (IBAction)topButton:(id)sender { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeFinished:) name:@"UIMoviePlayerControllerWillExitFullscreenNotification" object:nil]; videoWebView.hidden=NO; NSString *embedcode = [self.detailItem objectForKey:@"youtubeEmbedCodeBeginner"]; [[self videoWebView]loadHTMLString:embedcode baseURL:nil]; }
and
-(void)youTubeFinished:(NSNotification *)notification{
Any help would be appreciated
source share