I'm working through the Big Nerd Ranch's iOS Programming book (3rd edition), and there's one particular example that involves a full screen image embedded in a full screen UIScrollView. Both are created as follows:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
CGRect screenRect=[[self window] bounds];
UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:screenRect];
view=[[HypnosisView alloc] initWithFrame:screenRect];
We're asked to make the status bar disappear using the following line:
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];
Everything works fine, but what I don't understand is this: why are the window's bounds the same regardless of whether or not the status bar is there? They are always (0,0,320,568), but I would have expected the height to shrink if I hid the status bar.
Thanks for reading.