Woodstock
Woodstock

Reputation: 22946

Best practice with UIActivityViewController

With regard to best pratice, when finished using a UIActivityViewController should one dismiss it from the viewController that presented it using a delegate pattern?

When modally presenting other ViewControllers, I always use a delegate pattern to ensure that the parent (or presenting) viewController also does the dismissing - I believe this is best pratice, so I am wondering if the same applies here?

Upvotes: 1

Views: 183

Answers (1)

txulu
txulu

Reputation: 1802

From the docs:

Your app is responsible for configuring, presenting, and dismissing this view controller. Configuration for the view controller involves specifying the data objects on which the view controller should act. (You can also specify the list of custom services your app supports.) When presenting the view controller, you must do so using the appropriate means for the current device. On iPad, you must present the view controller in a popover. On iPhone and iPod touch, you must present it modally.

So, answering to your question, yes. You should treat it the same way as if you had coded that view controller.

Upvotes: 2

Related Questions