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

Call onDismiss when FullscreenView is dismissed #1

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

vdka
Copy link
Contributor

@vdka vdka commented Sep 29, 2021

I noticed my onDismiss wasn't called when I used .present(isPresented: $showOverlay, style: .overFullscreen, onDismiss: reset) { ... } this PR addresses that by passing onDismiss to FullscreenView and from FullscreenView to FullscreenWrapper then calling onDismiss in the onDismiss closure passed to:

func viewController<V: View>(rootView: V, isModal: Bool, transition: UIModalTransitionStyle, style: UIModalPresentationStyle, onDismiss: (() -> Void)?) -> UIViewController

@shaps80
Copy link
Collaborator

shaps80 commented Sep 29, 2021

Nice one! I will properly review and test ASAP but this looks good at a glance, thanks for this!

@shaps80
Copy link
Collaborator

shaps80 commented Sep 29, 2021

Hmmm so I grabbed your PR and tested and for me it doesn't appear to fix the issue. Can you provide (on the original Issue) a working demo. I'll add mine as well in case I've missed your point. But I think mine demonstrates there is indeed an issue here nonetheless.

@shaps80 shaps80 merged commit c7fad30 into SwiftUI-Plus:master Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants