I have been checking out some posts on bounds vs frames but still a bit confused.
I have the following hierarchy: UITabBarController > UINavigationController > UIViewController
When I tried the following NSLog
NSLog(@"%f %f %f",[[[self tabBarController] view] bounds].size.height, [[[self navigationController] view] bounds].size.height, [[self view] bounds].size.height);
I get the following Output:
480.000000 431.000000 460.000000
I understand the 20 difference accounts for the status bar height, but I don't understand why the UIViewController's bound excludes the status bar height, but that for UINavigationController and UITabBarController include...
REFINING MY QUESTION
1) Why does the top tabBarController has a height of 480.0 (why doesn't it exclude the status bar height of 20pt???). Ok, let me assume height will always NOT exclude the status bar height and move on for now
2) The UINavigationController has a height of 431.0 (ok, a reasonable guess is that it is 480-49, where 49 is the height of the tab bar). But why does it selectively exclude the height of the tab bar but NOT the height of the status bar??? Apple's View Programming Guide doesn't not seem to explain that... but let's move on...
3) Why does my UIViewController has a height of 460?!
(3a) why does it exclude the 20pt height of the status bar unlike UITabBarController and UINavigationController???
(3b) AND MORE importantly, why does it NOT exclude the height of the navigation bar (i.e. why shouldn't it be 431-44 = 387?!)
(3c) why does my UIViewController which is INSIDE my UINavigationController has a LONGER height than the UINavigationController???