0

xcode:4.5.2

我想在 iPad 上创建一个应用程序;

我将 info.plist 设置如下:

初始界面方向:横向(左主页按钮)

当我启动我的应用程序时,方向设备具有横向模式,但我的视图不会旋转到这个方向。

不知道是什么,谁能帮帮我

4

2 回答 2

0

ios6中,您必须使用此方法vieworientation

-(BOOL)shouldAutorotate
{
    return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationMaskAll;
}
于 2012-11-27T14:33:54.213 回答
0

你是否实现了以下这些方法。

 -(BOOL)shouldAutomaticallyForwardAppearanceMethods{   
         // This method is called to determine whether to 
         // automatically forward appearance-related containment
         //  callbacks to child view controllers.
        return YES;

    }
    -(BOOL)shouldAutomaticallyForwardRotationMethods{
        // This method is called to determine whether to
        // automatically forward rotation-related containment 
        // callbacks to child view controllers.
       return YES;
    }
于 2012-11-27T10:31:01.930 回答