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

Distinguish tapping on Done and Cancel button in SwiftUIPhotosCropView #176

Merged
merged 1 commit into from Aug 21, 2022

Conversation

andre0805
Copy link
Contributor

Currently, when using SwiftUIPhotosCropView, there’s no way of telling whether the user tapped Cancel button or Done button in the Crop view because the same callback function is passed to cropViewController.handlers.didFinish and cropViewController.handlers.didCancel. There's a simple and straightforward solution for that, I implemented 2 distinct functions: onDone, which is called when user taps the Done button (passed to cropViewController.handlers.didFinish), and onCancel, which is called when user taps the Cancel button (passed to cropViewController.handlers.didCancel).

Implement distinct callback functions onDone() and onCancel() for SwiftUIPhotosCropView which will be called from cropViewController on didFinish and didCancel
@muukii muukii merged commit 62737a4 into FluidGroup:main Aug 21, 2022
@muukii
Copy link
Collaborator

muukii commented Aug 21, 2022

@andre0805 hi! thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants