IOS 7 detailed layout when the wizard has a navigation bar tip

I ran into a layout issue in iOS 7:

Screenshothot

To reproduce, create a simple master-part-application and paste this line into MasterViewController.m:

self.navigationItem.prompt = @"Master"; 

and this is in DetailViewController.m:

 self.edgesForExtendedLayout = UIRectEdgeNone; 

Both lines in viewDidLoad .

The detail view frame does not update correctly when the navigation bar shrinks to its normal size.

How do I fix this?

+5
ios layout ios7 master-detail uinavigationbar
source share
1 answer

My current solution for this is to remove the prompt in the master view viewWillDisappear:

 - (void) viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; self.navigationItem.prompt = nil; } 

Then just set it again in viewWillAppear. However, there must be a better method.

+3
source share

All Articles