I have a problem opening MPMoviePlayerController in full screen starting from the current ModalViewController.
I open the current ModalViewController
mDetailFilmController = [[DetailFilmController alloc]
initWithNibName:@"DetailFilmController" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:mDetailFilmController];
navController.modalPresentationStyle = UIModalPresentationPageSheet;
navController.navigationBar.barStyle = UIBarStyleBlack;
[self presentModalViewController:navController animated:YES];
navController.view.superview.bounds = CGRectMake(0, 0, 700, 700);
in DetailFilmController there is MPMoviePlayerController and this is the code for the play button:
self.mPlayer = [[MPMoviePlayerController alloc] init];
self.mPlayer.contentURL = btn.linked_url;
self.mPlayer.view.frame = self.view.frame;
[self.mViewForMovie addSubview:mPlayer.view];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_moviePlayerDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:mPlayer];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_moviePlayerDidFinish:) name:MPMoviePlayerDidExitFullscreenNotification object:mPlayer];
[self.mPlayer setFullscreen:YES animated:YES];
[self.mPlayer play];
The problem occurred when I try to click the "do" button, it will not work.
Only in the area of ββthe current ModalViewController below can you intercept a click.
What have I done wrong?
thanks for the help
Don
source
share