Chris
Chris

Reputation: 1363

How do I show a modalviewcontroller well in a tableview

I need to show a modal view controller when users click a info button on the top right of my application.

Upvotes: 0

Views: 50

Answers (1)

jer
jer

Reputation: 20236

Add an action which you link to a rightBarButtonItem in your navigation controller, or toolbar, whatever you're using -- wherever you want to put it. Anyway, when you set up your button, you want to make sure that when the user presses it, it calls your action.

In the action, you need to create an instance of another view controller which references your modal view, and you want to tell your nav controller to presentModalViewController:animated: your view controller you just created.

Doing this, your modal view will pop up and display.

Upvotes: 2

Related Questions