我希望我的应用程序是景观。我尝试了所有的方法,我的故事板的方向是横向的,我在info.plist中改变了支持的方向和初始方向。有谁可以帮我?
在iOS 6模拟器中,它是横向的。
发布于 2013-05-02 02:43:13
在iOS 5中,您需要在每个视图控制器中实现以下方法。
// Called only in IO 5 and earlier.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
}并在Info.plist中将UIInterfaceOrientation "Initial interface orientation“设置为UIInterfaceOrientationLandscapeRight
并在横向模式下显示您的视图。
https://stackoverflow.com/questions/16322056
复制相似问题