On an iPad, my view controller (inside a navigation controller, as the detail view of a split view controller) has a topLayoutGuide length of 64 with the navigation bar shown and 20 with the navigation bar hidden. This makes sense.
On an iPhone in landscape, the status bar is automatically hidden and the navigation bar gets shorter. The topLayoutGuide length reads as 32 with the nav bar shown, and 0 with it hidden. This also makes sense.
However, on an iPhone in portrait, it has topLayoutGuide lengths of 44 with the nav bar shown and 0 with it hidden. The status bar is shown automatically; why doesn't the topLayoutGuide acknowledge that extra 20px of space?
I'd rather not write obnoxious conditional code just so the iPhone will read its topLayoutGuide correctly. Is there a property of the view or navigation controller that I can set that will return the intuitive values for topLayoutGuide? And does it have something to do with being inside a split view controller?