Question

I have a regular master-detail app with a Navigation View Controller, however, on the lowest level view controller, when user selects it, I would like to display content inside the same view but still have the navigation bar update, as if a new View Controller has been pushed.

For example in the Calendar App, when a user presses back, it zooms out into the months/years view, but does not look like it changes view controller.

What is the best way to implement this. When the user selects content, the new content zooms into full view, so there would be no user confusion as to the function of the back button.

I looked at using pushNavigationItem, but that doesn't work in navigation view controllers...

Thanks!

Was it helpful?

Solution

For the record, here's what I did...

Note: This is not for common situations, this kind of technique may tempt you to deviate from Apple's Human Interface Guidelines.

• A UIView was added on top of the UINavigationViewController

[[UIApplication sharedApplication].delegate.window addSubview:customView];

• Inside the new view, I placed a UINavigationBar, that was configured to look identical to the Navigation bar of the UINavigationViewController (including the back button!)

[navBar pushNavigationItem:item1 animated:NO]; // This item becomes the back button
[navBar pushNavigationItem:item2 animated:NO]; 

• Then you can animate the new navBar seamlessly

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top