Reputation: 707
I was developing an App for iOS 6 and this is one of my views.
Now I've updated my iPhone to iOS 7 and this is the result:
Now all the views are behind the navigation bar because iOS 7' UIViewController's views starts at the top left edge of the screen and not under the UINavigationBar as iOS 6. Now the "email" field is behind the navigation bar. Is there a way to use the iOS 6 style?
Thanks
Marco
Upvotes: 9
Views: 4076
Reputation: 566
I had a similar problem and I fixed it by writing following code in the views' viewWillAppear
method:
self.edgesForExtendedLayout = UIRectEdgeNone;
Upvotes: 0
Reputation: 1232
STEP BY STEP WITH IMAGES
Upon reading this question I was experimenting as I had the exact same question. I then found the answer.
1) Make sure storyboard is on iOS 7
2.) Select the viewcontroller from the storyboard (In your case the Login Controller)
3.) Make sure that 'Under Top Bars' is Deselected
Upvotes: 7
Reputation: 7639
You need to turn off translucent for the navigation bar and that should adjust the iOS 7 constraints to be the bottom of the navigation bar again.
They have completely removed the old style for navigation bars in iOS 7. You could set the navigation bar to be an image, which could utilize the look from iOS 6, but I think it would be safer to just go with the new iOS 7 default appearance.
Upvotes: 3