react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[V4] Support DidAttemptToDismiss for pageSheet modals

Open manicantic opened this issue 6 years ago • 3 comments

Hi, since 4.0.3 there is possibility to set swipeToDismiss under modal options. This is really nice addition, but also implementing DidAttemptToDismiss with a callback would be a great addition to this functionality. I tried myself to implement this but I am not so good at objective C. But this might helped, in RNNModalManager.m there should be implementation of - (void)presentationControllerDidAttemptToDismiss:(UIPresentationController *)presentationController with getting calling callback passed to options -> modal -> onDismissAttempt or some other property name.

manicantic avatar Jan 03 '20 14:01 manicantic

Hi @manicantic,

Sounds like a great feature request! Will tag @yogevbd and @guyca so they can hopefully add it to the backlog.

ItsNoHax avatar Jan 07 '20 13:01 ItsNoHax

Hi @ItsNoHax , I've just created PR with AttemptedToDismiss event. You can check it out here : https://github.com/wix/react-native-navigation/pull/5832

manicantic avatar Jan 07 '20 14:01 manicantic

Solid work @manicantic! :muscle:

I've passed the PR on and it should hopefully be looked at in the next couple days!

ItsNoHax avatar Jan 07 '20 14:01 ItsNoHax