Closed jaiversin closed 11 years ago
If you have, say, a UIButton
in the popup view controller, you can hook up the dismissal from your main view controller something like this:
[self.popupViewController.myButton addTarget:self action:@selector(dismissButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
Then, call the dismiss function in dismissButtonClicked
.
I was thinking about something like an own function for dismissing (on the category, I think), but it just works.
Thanks!
I think it's more convenient if it's possible to dismiss the view controller inside the popup itself.
[self.parentViewController dismissPopupViewControllerAnimated:YES completion:^{ NSLog(@"popup view dismissed"); }];
call this on your popup view controller. don't forget to import #import "UIViewController+CWPopup.h" ;)
thanks MJACOBS84 , it works for me :+1:
Hi,
Is there a way to dismiss the popup view from the presented view controller?
Thanks.