Search code examples
iphonelabelmpmovieplayer

MPMoviePlayerViewController - How to keep image on MPMoviePlayerViewController when change Fullscreen?


NSURL *url = [self localMovieURL];
MPMoviePlayerViewController *playerView = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
MPMoviePlayerController *moviePlayer = [playerView moviePlayer];

moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.scalingMode = MPMovieControlStyleFullscreen;

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayBackDidFinish:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:moviePlayer];

[self setMessageLabel];
[playerView.view addSubview:message];

[self.navigationController presentMoviePlayerViewControllerAnimated:playerView];

hello,

somthing wrong .. mpMoviePlayerViewController.

source > 'message (UILabel)' is global variable.

video play > full screen button click > gone label ...

I don't know Why gone label.

anybody help me please .


Solution

  • Just a hunch but you should try following the MPMoviePlayerDidEnterFullscreenNotification notification and then do the following in the notification handler,

    [message.superview bringSubviewToFront:message];