开发者

How do I show a modalviewcontroller well in a tableview

开发者 https://www.devze.com 2023-01-15 07:05 出处:网络
I need to show a modal view controller when users click a info button on the t开发者_如何转开发op right of my application.Add an action which you link to a rightBarButtonItem in your navigation contro

I need to show a modal view controller when users click a info button on the t开发者_如何转开发op right of my application.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消