可能重复: How to make app fully working correctly for autorotation in iOS 6?
在iOS6中有自转的问题。我在中添加了以下内容:
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return (UIInterfaceOrientationMaskAll);
}并在中添加了以下内容:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait);
}我还是不能让它成为肖像,而不是风景!帮助是非常感谢的。
发布于 2013-01-05 16:57:27
您不需要在App对象中设置接口方向。在中选择您的项目文件。然后选择目标并选择Summery。在这里,您可以选择支持的接口方向。这适用于整个项目。
发布于 2013-01-05 16:34:15
仅将其粘贴到ViewController:
- (NSUInteger)supportedInterfaceOrientations
{
return (UIInterfaceOrientationMaskPortrait);
}删除shouldAutorotate和application:supportedInterfaceOrientationsForWindow:。
https://stackoverflow.com/questions/14173558
复制相似问题