Notification when dismissing popin
Opened this issue · 3 comments
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!!
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.
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;
+1. Also - we can expose dimmingView property so we can attach our custom gesture recognisers onto it as well.