iOS status bar orientation after play video fullscreen

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 03:25:39

问题


I have an issue when play youtube video on iOS 6.1.2. That is, after play vieo at full screen mode at landscape (my app just supports portrait mode), or if user press Done during playing video, the status bar will not rotate. like this:

Now I register the UIMoviePlayerControllerDidExitFullscreenNotification observer to change the rotation of statusbar and it work fine on iOS 6.1 and below, but not in iOS 6.0.1

Please tell me if I make any mistake. Or any other solution to fix the statusbar orientation is welcome.

 [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(youTubeVideoExit:)
                                                 name:@"UIMoviePlayerControllerDidExitFullscreenNotification"
                                               object:nil];


- (void)youTubeVideoExit:(id)sender {
    [[UIApplication sharedApplication] setStatusBarOrientation:UIDeviceOrientationPortrait animated:NO];

}

来源:https://stackoverflow.com/questions/15426083/ios-status-bar-orientation-after-play-video-fullscreen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!