Navigation Bar + presentModalViewController

I have an application based on the navigation bar, and at some specific point in the application I have a button on the navigation bar that should present a new view using a flip transition (essentially taking a user from a table into a map view), Currently time i use

 DetailLocationView *detailLocationView = [DetailLocationView alloc] init];
 detailLocationView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
 [self.view presentModalViewController:detailLocationView animated:YES];
 [detailLocationView release];

This code displays the entire view in which the user is located (navigation bar and table view), and flips it only in detailLocationView. However, I would like for the detailLocationView to still have a navigation bar. I am wondering what is the best way to load the detailLocationView file so that it has a flip transition and still has a navigation bar.

thank

+3
source share
1 answer

pushViewController instead of the current ModalViewController will save the navigation bar, but will not, as you want.

If you want to flip and still have Navbar, you have to flip to a new view using the navigation bar. This is illogical, although from the point of view of the user interface - that is, when you visually see an inverted view, you see that it changes to something completely different - so to view the flip and then open the same navigator can be a bit confusing.

+4
source

Source: https://habr.com/ru/post/1770976/


All Articles