I am having problems with the application of my iPad application to discover its interface. Orientation in the first initialized UIViewController I (in code). In fact, if I track for application.statusBarOrientation, this also returns 1 (UIInterfaceOrientationPortrait), even if I run in landscape.
If I track self.interfaceOrientation in my first UIViewController, it stays 1 until it gets viewWillDisappear ... Unfortunately, it's too late!
Here is some code (although not much):
In my appDelegate app, I have the following:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // show loading screen first [window addSubview:loadingScreenViewController.view]; [window makeKeyAndVisible]; NSLog(@"applicationDidBecomeActive:statusBarOrientation = %d", application.statusBarOrientation); return YES; }
which tracks 1 (portrait), although I can clearly see that the status bar is a landscape ... and in the first view controller, I have this:
- (void)viewDidLoad { [super viewDidLoad]; NSLog(@"self.interfaceOrientation = %d", self.interfaceOrientation); }
which also tracks 1, even in landscape mode.
Any ideas? Standing here!
Thanks:)
: - Joe
objective-c ipad statusbar uiinterfaceorientation viewdidload
jowie
source share