Alex Rivera | Logout

How to dismiss a view controller opened with presentModalViewController:

Asked 2011-03-01T15:48:19.740
17

I presented a view controller using presentModalViewController:, now how to close/dismiss it?

Edit
Report

1 Answer

13

You have two choices, both involves using dismissModalViewController.

The preferred way is to use delegation and tell the view controller who was responsible for presenting the view to dismiss it. The other way is to have the view who was presented to dismiss itself (which actually asks the parent to dismiss it.)

answered 2011-03-01T16:44:23.620

Your Answer