iOS Navigation Bar in tab bar controller doesn't rotate properly
I have a tab bar controller whose 2 tabs both contain views with navigation bar controllers. 开发者_C百科 When I display the app in portrait everything is fine, however when I display just the first tab in portrait, then rotate the device and display the second tab in landscape, the navigation bar of the second view stretches while the first stays in 'portrait size'. I have been able to replicate this in a basic project that I've uploaded to rapid share
I am guessing this is a easy fix.
Thanks in advance!
Found the answer. I had a view for each tab with a navigation controller within that view. By changing the tab view to a navigation controller instead, resolved this error.
Basically, my original setup was tab navigator -> view -> navigation controller
This I changed to tab navigator -> navigation controller
It works correctly now.
精彩评论