1

Hi there I have an app where I have set supported interface orientation is set as landscape (left home button), landscape(right home button) in .plist file

and in the testviewcontroller.m file

I have the code: -

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

what changes do I have to make for it to appear normal on ios6 simulator

Thanks

found an answer: -

    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];
}

from this link -

IOS 6 force device orientation to landscape

but now with another problem in ios6 - clicking on a textbox doesn't invoke the keyboard

Community
  • 1
  • 1
Jatin
  • 1,668
  • 2
  • 16
  • 23

2 Answers2

0

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

The UIKit section explains how to do rotations in iOS6.

rocky
  • 3,521
  • 1
  • 23
  • 31
  • I am not trying to rotate the device here. I am just loading the app in landscape mode in ios6.0 simulator and it appears rotated right but it apears alright in ios5.0 – Jatin Oct 25 '12 at 23:55
  • You want to handle orientation correctly right? You need to implement the iOS 6 rotation methods to do so. Details are in the release notes. – rocky Oct 26 '12 at 04:24
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];
}
Jatin
  • 1,668
  • 2
  • 16
  • 23