Abhinav
Abhinav

Reputation: 38162

Showing a Modal view

In my application, I need to show two Modal view one after the other. Tap on one screen will show a Modal and then a button on this Modal view will show another Modal.

Both my Modal view also contains a top bar with two buttons.

What is the best way to showing these Modal views. Should I use Navigation controller to control these Modal views or a simple view controller?

Upvotes: 0

Views: 379

Answers (1)

sudo rm -rf
sudo rm -rf

Reputation: 29524

I'd just have them set up using a view controller. Just do this to present the view when it's needed, and just implement a "Done" or "Save" UIBarButton depending on what you need it for.

YourViewController *yourView = [[YourViewController alloc] init];
yourView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:yourView animated:YES];

Upvotes: 2

Related Questions