1

嗨,我有一个应用程序,我在其中设置了支持的界面方向,在 .plist 文件中设置为横向(左主页按钮)、横向(右主页按钮)

并在 testviewcontroller.m 文件中

我有代码: -

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

我必须进行哪些更改才能使其在 ios6 模拟器上正常显示

谢谢

找到了答案:-

    if ([[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
    // how the view was configured before IOS6
    [self.window addSubview: navigationController.view];
    [self.window makeKeyAndVisible];
}
else
{
    // this is the code that will start the interface to rotate once again
    [self.window setRootViewController: self.navigationController];
}

从这个链接 -

IOS 6强制设备方向为横向

但现在 ios6 中的另一个问题 - 单击文本框不会调用键盘

4

2 回答 2

0

https://developer.apple.com/library/prerelease/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html

UIKit 部分解释了如何在 iOS6 中进行旋转。

于 2012-10-25T23:54:43.660 回答
0
   if ([[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
    // how the view was configured before IOS6
    [self.window addSubview: navigationController.view];
    [self.window makeKeyAndVisible];
}
else
{
    // this is the code that will start the interface to rotate once again
    [self.window setRootViewController: self.navigationController];
}
于 2012-11-07T14:05:34.060 回答