MPMoviePlayerControler issue in full screen if open on TodayModalViewController in iPad

I have a problem opening MPMoviePlayerController in full screen starting from the current ModalViewController.

I open the current ModalViewController

//Create controller
mDetailFilmController = [[DetailFilmController alloc]
                                    initWithNibName:@"DetailFilmController" bundle:nil];

UINavigationController *navController = [[UINavigationController alloc]
                                         initWithRootViewController:mDetailFilmController];

//Set modal style
navController.modalPresentationStyle = UIModalPresentationPageSheet;
navController.navigationBar.barStyle = UIBarStyleBlack;

//presentModalViewController
[self presentModalViewController:navController animated:YES];


//Dimension
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];

//set url
self.mPlayer.contentURL = btn.linked_url;

//set dimension
self.mPlayer.view.frame = self.view.frame;

//AddSubView
[self.mViewForMovie addSubview:mPlayer.view];

//Notify
[[NSNotificationCenter defaultCenter]  addObserver:self selector:@selector(_moviePlayerDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:mPlayer];
[[NSNotificationCenter defaultCenter]  addObserver:self selector:@selector(_moviePlayerDidFinish:) name:MPMoviePlayerDidExitFullscreenNotification object:mPlayer];

//fullscreen
[self.mPlayer setFullscreen:YES animated:YES];

//start play
[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

+5
source share

All Articles