启用QLPreviewController
答
试着用下面:
在 “AppDelegate中”
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
return UIInterfaceOrientationMaskLandscape;
}
在你们各自的 “视图控制器” 中,你必须实行 “QLPreviewController”
以下地址:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft)
return YES;
else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight)
return YES;
else
return NO;
}
希望,这将是对你有所帮助。
干杯!
+0
我使用ios6(有一个标签ios 6),我有试过它对我不起作用 – revolutionkpi 2013-02-11 10:55:56
答
在应用程序委托这样做也无济于事。创建的UIVieController , UITabbarController (if you are using one in your app)
延伸并覆盖NISHANT乙已为您提供有这两种方法。这两个是在iOS6的添加了两个新的API。
按照此为iOS 6 http://*.com/questions/13758398/orientation-is-not-working-in-ios6/13758480#13758480 – Rajneesh071 2013-02-11 11:17:00