iOS8 Device appears stuck in portrait, but rendering landscape

492 views Asked by At

This is a strange issue that may be related to all the orientation issues I'm seeing in iOS8.

I have a universal app. The iPad version supports only landscape and the iPhone version supports only portrait.

When a user opens the iPad version, it opens in landscape mode, which is expected. However, every control on the right side of the view is unresponsive to user touch events. The affected area is 256 wide, and the area on the left that 'works' is 768 wide (portrait width). Therefore, even though the app opens in landscape, the app thinks it's in portrait. Since the phone version only supports portrait, the issue doesn't reveal itself there, though I believe the issue is not device specific, however, the issue only affects devices running iOS8.

The app was originally developed for iOS4 and has gone through several iterations since. However, much of the original code and nibs are still in use. Other orientation issues have shown up with iOS8 and could be related, or not, who knows?

Since the app was originally designed for iOS4, storyboards were not used, and still aren't. I have checked some things: made sure all nibs have 'Auto resize subviews' checked, and made sure that only landscape orientations existed in the app plist (verified in XML). Here is a code snippet from AppDelegate didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    [self.window setFrame:[[UIScreen mainScreen] bounds]];

    self.viewController = [[AppMainViewController alloc] initWithNibName:nib bundle:nil];

    //...

    return YES;
}

enter image description here

In the image, I'm showing both portrait and landscape sizes. As I mentioned earlier, the view controller renders and looks as it should in landscape, but anything in the red area of the image is unresponsive to user taps.

Perhaps I've looked at this issue too long and hopefully somebody has some insight on why this is happening. Anyone? Thanks!

0

There are 0 answers