Iphone xCode 4.6上的定向横向iOS 5

Iphone xCode 4.6上的定向横向iOS 5,iphone,xcode,ios5,ios6,orientation,Iphone,Xcode,Ios5,Ios6,Orientation,我希望我的应用程序是横向的。我尝试了一切,我的故事板的方向是横向的,我在info.plist中更改了支持的方向和初始方向。有人能帮我吗 在iOS 6模拟器中,它是横向的。在iOS 5中,您需要在每个视图控制器中实现以下方法 // Called only in IO 5 and earlier. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { retu

我希望我的应用程序是横向的。我尝试了一切,我的故事板的方向是横向的,我在info.plist中更改了支持的方向和初始方向。有人能帮我吗


在iOS 6模拟器中,它是横向的。

在iOS 5中,您需要在每个视图控制器中实现以下方法

// Called only in IO 5 and earlier.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
            interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
}
并设置UIInterfaceOrientation“初始接口方向 “在您的Info.plist中创建界面方向和景观

并以横向模式布置视图


根据

在iOS 5中,您需要在每个视图控制器中实现以下方法

// Called only in IO 5 and earlier.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
            interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
}
并设置UIInterfaceOrientation“初始接口方向 “在您的Info.plist中创建界面方向和景观

并以横向模式布置视图