NavigationBar overlays with DetailView


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


As this problem continued for me in Chapter 12, I continued my google search and finally came over a solution at Stackoverflow

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?!