Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification when dismissing popin #7

Open
littlepotatosoftware opened this issue Mar 29, 2014 · 3 comments
Open

Notification when dismissing popin #7

littlepotatosoftware opened this issue Mar 29, 2014 · 3 comments

Comments

@littlepotatosoftware
Copy link

It would be great to have a way to be notified when then popin is dismissed by clicking outside of the popin. Perhaps register a block to be called upon dismissal?

Great library!!

@sparga
Copy link
Collaborator

sparga commented Mar 31, 2014

Thank you.
This is a good idea. As we already have a completion block, I think it will be simpler to add a parameter indicating how the popin has been dismissed.
This would give something like that :

- (void)dismissCurrentPopinControllerAnimated:(BOOL)animated 
           completion:(void(^)((BOOL autoDismissed)))completion;

Anyway, it requires some refactoring but I will add this option in the next release.

@wahkiz
Copy link

wahkiz commented Aug 19, 2014

I am not sure how the above changes would be useful if the popin is dismissed by tapping outside the popin. Anyway I solved this problem by sending an NSNotification at - (void)viewWillDisappear:(BOOL)animated;

@grabbou
Copy link

grabbou commented Apr 4, 2015

+1. Also - we can expose dimmingView property so we can attach our custom gesture recognisers onto it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants