Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird behavior with navigation controller and its root view controller in iOS 7
    text
    copied!<p>I encounter a strange behavior with a navigation controller and its root view controller in iOS 7. The goal is to use a sliding menu like MMDrawerController (<a href="http://github.com/mutualmobile/MMDrawerController/" rel="nofollow noreferrer">http://github.com/mutualmobile/MMDrawerController/</a>) or ECSlidingViewController (<a href="http://github.com/edgecase/ECSlidingViewController" rel="nofollow noreferrer">http://github.com/edgecase/ECSlidingViewController</a>).</p> <p>With both of them I got a bottom gap problem with my center main view (as seen on screenshots). In both case i'm using the "storyboard instantiateViewControllerWithIdentifier" to retrieve my controllers, so I think the problem comes from here.</p> <p>The navigation controller frame (center main view) is ok. But the root view controller of this navigation controller got a wrong frame height...</p> <p>Everything is fine in iOS6 and Xcode4, and the problem appears in iOS7 ans Xcode5. I already fixed the "extend edges" for all the app, only this navigation controller got this problem...</p> <p>After more investigations, it seems that the problem is that the height of the uitabbar is removed twice :</p> <p>1 - ECSlidingViewController remove the uitabbar height to calculate its own height</p> <p>2 - ECSlidingViewController load navigation controller as center main view with its frame</p> <p>3 - Navigation controller load its root view controller</p> <p>4 - Root view controller remove the uitabbar height again to calculate its height</p> <p>So the Root view controller get "window size - uitabbar height - uitabbar height". This is why there is a gap of the size of the uitabbar...</p> <p>Now I need to find out why such behavior, and how to get rid of it... Thanks in advance if you got any idea about this problem !</p> <p><img src="https://i.stack.imgur.com/hZdj0.jpg" alt="problem 1"> <img src="https://i.stack.imgur.com/CGWXF.jpg" alt="problem 2"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload