Ios MPMoviePlayerViewController将UIView移到状态栏后面
在iOS 7上使用MPMoviePlayerViewController多次播放电影后,整个屏幕移到状态栏后面。我已经通过在应用程序委托中添加以下代码说明了iOS 7在应用程序启动时使用全屏所做的更改Ios MPMoviePlayerViewController将UIView移到状态栏后面,ios,xcode,statusbar,Ios,Xcode,Statusbar,在iOS 7上使用MPMoviePlayerViewController多次播放电影后,整个屏幕移到状态栏后面。我已经通过在应用程序委托中添加以下代码说明了iOS 7在应用程序启动时使用全屏所做的更改 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { [application setStatusBarStyle:UIStatusBarStyleLightContent]; [applicati
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
{
[application setStatusBarStyle:UIStatusBarStyleLightContent];
[application setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
self.window.clipsToBounds =YES;
self.window.frame =CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
}
它完美地显示了初始屏幕。但是,在该屏幕上有一个按钮,用于播放视频并使用以下方法退出
- (void)playFullScreenMovie
{
NSURL *url = [NSURL URLWithString:vidURL];
self.playerVC = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
// Register this class as an observer
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:self.playerVC.moviePlayer];
[[self playerVC].moviePlayer prepareToPlay];
[self presentViewController:self.playerVC animated:NO completion:nil];
}
// When the movie is done, release the controller.
-(void)movieFinishedCallback: (NSNotification*) aNotification
{
MPMoviePlayerController* theMovie = [aNotification object];
[[NSNotificationCenter defaultCenter]
removeObserver: self
name: MPMoviePlayerPlaybackDidFinishNotification
object: theMovie];
[self dismissMoviePlayerViewControllerAnimated];
}
当演示屏幕返回时,它会上移到状态栏后面
尚未奏效的解决方案包括: