我有一部电影,单击按钮即可在MPMovieplayerViewcontroller中全屏播放。但是 MPMoviePlayerViewController 不会在顶部显示导航栏。如何使导航栏在播放电影时可见?
MPMoviePlayerViewcontroller
是一个标准的UIViewController
,所以只需将其显示为UINavigationController
的rootViewController
即
而不是
[self presentViewController:myMoviePlayerViewController animated:YES completion:nil];
做:
UINavigationController *movieNavController = [[UINavigationController alloc] initWithRootViewController:myMoviePlayerViewController];
[self presentViewController:movieNavController animated:YES completion:nil];