So it seems that the presentation frame in the navigation controllers of iOS 7 is defined differently (in my opinion, strange) compared to iOS 7 ...
EXAMPLE: Imagine a UIViewController that contains a UIScrollView ( self.scrollView ) that fills the entirety of self.view and with spacers and springs so that it always self.view . Now insert this UIViewController into the UINavigationController with a visible navigation bar.
In iOS 6, I observe the following:
self.view.frame.origin = (0.0, X) where X = the height of the status bar (which contains time, signal bands, etc. = 20.0 )self.view.frame.size.height = self.view.bounds.size.height = total height minus self.navigationController.navigationBar.frame.size.heightself.scrollView.frame.origin = self.scrollView.bounds.origin = (0.0, 0.0)
In iOS 7, I observe the following:
self.view.frame.origin = (0.0, 0.0)self.view.frame.size.height = self.view.bounds.size.height = total height (i.e. decreasing height when embedded in the navigation controller)self.scrollView.bounds.origin = (0.0, -1 * self.navigationController.navigationBar.frame.size.height) , but self.scrollView.frame.origin = (0.0, 0.0)
My guess is that this is done so that the content can remain under the navigation bar, so that the smallest amount of blur + transparency a la iOS 7 is displayed on the navigation bar.
QUESTION: How can I get the actual size (width x height) of self.scrollView in iOS 7 when it is built into the navigation controller, given the above observations, since self.scrollView.bounds.origin == self.scrollView.contentOffset ? I just need to write different code for iOS 6 v. IOS 7 and determine which version works?
I really do not want to assume that there is any specific size and hard code on the screen, because it looks like a bad shape ...
UPDATE 1: I uploaded a sketch of what I'm trying to ask. Please note that the correct answer in this case is 416.0 , which is easy to get in iOS 6, but I'm not sure how to get it in iOS 7 without resorting to assumptions.

source share