self.view.frame.size in viewDidLoad and didRotateFromInterfaceOrientation are different
- by tokentoken
I created iphone view-based project, and added UINavigationController by code.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
TestViewController *vc = [[TestViewController alloc]init];
navController = [[UINavigationController alloc]initWithRootViewController:vc];
[window addSubview:navController.view];
[window makeKeyAndVisible];
return YES;
}
After that, I checked self.view.frame.size.height in viewDidLoad and didRotateFromInterfaceOrientation, and they're different.
(they're 460 and 416)
I suppose the height of NavigationBar is not included in viewDidLoad, but should I add it manually (add 44)?