2

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 (http://github.com/mutualmobile/MMDrawerController/) or ECSlidingViewController (http://github.com/edgecase/ECSlidingViewController).

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.

The navigation controller frame (center main view) is ok. But the root view controller of this navigation controller got a wrong frame height...

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...

After more investigations, it seems that the problem is that the height of the uitabbar is removed twice :

1 - ECSlidingViewController remove the uitabbar height to calculate its own height

2 - ECSlidingViewController load navigation controller as center main view with its frame

3 - Navigation controller load its root view controller

4 - Root view controller remove the uitabbar height again to calculate its height

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...

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 !

problem 1 problem 2

1 Answers1

0

I found that just hiding navigationController toolbar did the trick...

[self.navigationController.toolbar hide];

PS: MMDrawerController bug ?

Renetik
  • 5,887
  • 1
  • 47
  • 66