In method application:didFinishLaunchingWithOptions in AppDelegate I initiate a view controller and add to navigation view controller that becomes window root view controller. Because my iPad app is only horizontal orientation all my view controllers are made for landscape.
Here is the code:
self.myViewController = [[MyViewController alloc] init];
self.myNavigationController = [[MyNavigationController alloc] initWithRootViewController: self.myViewController];
self.window.rootViewController = self.myNavigationController;
[self.window makeKeyAndVisible];
return YES;
When I put breakpoint on "self.window.rootViewController = self.myNavigationController;" line and call in console to display view details, I get following: $0 = 0x0c89d010 >
which I read the rect is orientation mode (1024 width and 748 height)
The next breakpoint that is on "return YES;" shows me this: $1 = 0x0c89d010 >
which copy an object (as far as I can see) and changes orientation (768 width and 1004 height)
This only happens in iOS5, however iOS6 works as expected
Is there any known issue with MakeKeyAndVisible method that I should know? Or may be it is lack of my understanding how makeKeyAndVisible works
makeKeyAndVisible- the way orientation is handled was changed between iOS 5 and iOS 6 - Paul.sshouldAutoRotateToInterfaceOrientation:and does this method get called? - Paul.s