【发布时间】:2013-01-05 16:03:27
【问题描述】:
可能重复:
How to make app fully working correctly for autorotation in iOS 6?
在 iOS6 中遇到自动旋转问题。我在 App Delegate 中添加了这个:
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return (UIInterfaceOrientationMaskAll);
}
并在视图控制器中添加了这个:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait);
}
我仍然无法让它只是纵向而不是横向!非常感谢您的帮助。
【问题讨论】:
-
我已经发布了一个答案 Ryan...
-
类似,但我有更多代码,现在真的还有更多。
标签: objective-c ios autorotate