uchicago-mobi / 2015-Winter-Forum

8 stars 1 forks source link

Dismissing UIPopoverPresentationController #138

Closed psajja closed 9 years ago

psajja commented 9 years ago

How do I dismiss the UIPopoverPresentationController from the DetailViewController. I have implemented the

@protocol BookmarkToWebViewDelegate

I m trying to dismiss the pop over controller in the method (void)bookmark:(id)sender sendsURL:(NSURL*)url;. I have a handle on both bookmarkviewcontroller and the popoverpresenationcontroller. But I am not sure on what method to call on these to dismiss the pop over ? Stackoverflow has some pointers to dismissing the popover controller but I believe things have changes in ios 8.

tabinks commented 9 years ago

You have to dismiss it just like any normal view controller.

[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
psajja commented 9 years ago

Thank you. That was straight forward. I have no idea what I was trying to do earlier.