I am running a test program with a sample view controller . In my app delegate , I have the following
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; NSLog(@"window frame %@",NSStringFromCGRect(self.window.frame)); }
The output is window frame {{0, 0}, {768, 1024}}. I have the device in lanscape mode but the window frame returns a swapped value of width and height .
I am not able to place my view components using hard coded values because of this . Any clues what is going wrong.