仅限iPad Xcode 4.6.3横向

仅限iPad Xcode 4.6.3横向,ipad,uiviewcontroller,orientation,landscape,xcode4.6.3,Ipad,Uiviewcontroller,Orientation,Landscape,Xcode4.6.3,我对景观定位有问题 我不使用故事板。 在*.codeproj摘要中,支持的界面方向为“横向选择左和右” 在AppDelegate.m中,我使用了 -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)

我对景观定位有问题 我不使用故事板。 在*.codeproj摘要中,支持的界面方向为“横向选择左和右”

在AppDelegate.m中,我使用了

-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        return UIInterfaceOrientationMaskLandscape;
    else  /* iphone */
        return UIInterfaceOrientationMaskAllButUpsideDown;
}
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}
在ViewController.m中,我使用了

-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        return UIInterfaceOrientationMaskLandscape;
    else  /* iphone */
        return UIInterfaceOrientationMaskAllButUpsideDown;
}
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}
在viewcontroller.xib中,所有视图(UIVIEW类)都是:

模拟指标
景观

在我的viewController中,我在viewController.m中定义了一些视图(UIVIEW类)

当我启动应用程序时,主视图会正确打开,但另一个视图会在纵向模式下第一次打开,当我旋转IPAD时,视图会在横向模式下更改

我希望所有视图第一次以横向模式打开

我试图改变方法

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscapeRight;
}
但是使用这种方法,视图永远不会改变,而是保持在纵向模式


主视图在横向模式下始终正确显示,问题在其他视图中。

有人可以帮助我解决所描述的问题吗?有人可以帮助我解决所描述的问题吗?