NavigationBar overlays with DetailView


#1

Hello everyone,

I just started to read through chapter 11 and came into a small issue/bug with the NavigationBar.

I repeated all steps in the book to add the DetailView to the HomePwner app, but the NavigationBar from the ItemsViewController still overlays the underlying DetailView.
The same behavior goes with the finished project from the main homepage.

I’m using XCode 5 and iOS 7 SDK

I added a screenshot from the simulator for a better understanding of my problem. (The NavigationBar overlays with the DetailView.xib therefore the NameLabel and the Nametextfield is not visible)

Thanks in advance for any help


#2

As this problem continued for me in Chapter 12, I continued my google search and finally came over a solution at Stackoverflow http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bounds-in-ios-7.

Therefore I added

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout = UIRectEdgeNone;

to the viewDidLoad Method of the DetailViewController.

Honestly, I don’t fully understand why this is needed or what it really does. It’s definitely something which came up with iOS7.

Maybe someone can explain this to me?!