I have a view controller, which has a UINavigationController, and a UITabController attached.
I’d like to know if there’s a way to get the available screen space? I’d really like to be to say CGPoint(0,0); is definitely in the top left corner, just below the UINavigationController and that self.view.frame.size.height is only the space I have left to draw in.
I’ve tried:
self.view.bounds and self.view.frame, but both think that the available space is 320×460, not 320×367 as I’d expect.
What would be the most correct way to do this, aside from hard-coding the number?
If you try to log the bounds in
viewDidAppearinstead ofviewDidLoad, you will get the expected result.