在我的应用程序中,我有一个显示视频链接列表的UIWebview。点击其中一个链接,MPMoviePlayer就会自动启动。但在全屏模式下,它不会在需要时旋转。
现在如何旋转它,因为我无法在webview中控制它。
发布于 2012-12-03 14:27:27
如果你使用的是iOS6,请使用- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {},因为在iOS6中不再提供shouldautorotate。
发布于 2012-12-03 16:59:57
将此方法发布到AppDelegate.m文件中。
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}发布于 2012-12-04 15:04:09
对于iOS6,您还应该确保在info.plist上的受支持界面方向键中添加了景观。
https://stackoverflow.com/questions/13677994
复制相似问题