【发布时间】:2013-05-01 16:19:51
【问题描述】:
我希望我的应用是横向的。我尝试了一切,我的故事板的方向是横向的,我在 info.plist 中更改了支持的方向和初始方向。谁能帮帮我?
在 iOS 6 模拟器中是横向的。
【问题讨论】:
标签: iphone xcode ios5 ios6 orientation
我希望我的应用是横向的。我尝试了一切,我的故事板的方向是横向的,我在 info.plist 中更改了支持的方向和初始方向。谁能帮帮我?
在 iOS 6 模拟器中是横向的。
【问题讨论】:
标签: iphone xcode ios5 ios6 orientation
在 iOS 5 中,您需要在每个视图控制器中实现以下方法。
// Called only in IO 5 and earlier.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
}
并设置 UIInterfaceOrientation "初始界面方向 " 到 Info.plist 中的 UIInterfaceOrientationLandscapeRight
并以横向模式布置您的视图。
【讨论】: