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

Modal view won't dismiss #2

Closed
bpisano opened this issue Jun 21, 2019 · 11 comments
Closed

Modal view won't dismiss #2

bpisano opened this issue Jun 21, 2019 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@bpisano
Copy link
Owner

bpisano commented Jun 21, 2019

The NewCityView should be dismissed when adding a new city. It actually doesn't work. Probably due to a SwiftUI bug.

@Jsayer7
Copy link

Jsayer7 commented Jun 28, 2019

I can't even seem to get the Add City modal to fire the request to get city completion results using Xcode 11.0 Beta 2.

@bpisano
Copy link
Owner Author

bpisano commented Jun 29, 2019

TextField completion handlers behaviors have changed with beta 2. I’m on it to fix it.

@bpisano bpisano added the help wanted Extra attention is needed label Jul 8, 2019
@bpisano
Copy link
Owner Author

bpisano commented Jul 8, 2019

@Jsayer7 fixed in Xcode 11 beta 3

@bpisano bpisano added the bug Something isn't working label Jul 8, 2019
@bpisano
Copy link
Owner Author

bpisano commented Jul 25, 2019

This bug makes me crazy. I still can't make this modal view dismiss when touching the cancel button...

@young40
Copy link

young40 commented Jul 25, 2019

please try this:

Button(action: {
//self.isAddingCity = false
UIApplication.shared.windows[0].rootViewController?.dismiss(animated: true, completion: {})
}) {
Text("Cancel")
}

@Jsayer7
Copy link

Jsayer7 commented Jul 25, 2019

That very well could work, however that seems like a hacky solution. To me, this is one of the shortcomings with SwiftUI. Of all things, presenting and dismissing a modal/sheet should not be this difficult.

@young40
Copy link

young40 commented Jul 25, 2019

hope the bug can be fixed in feature betas. @Jsayer7

@bpisano
Copy link
Owner Author

bpisano commented Aug 2, 2019

I tried a new solution that seems to be the default solution provided by Apple (see example here) but still not working.

@young40
Copy link

young40 commented Aug 2, 2019

@bpisano did you try it on Xcode 11 Beta5?

I test in another project, seems fixed.

@bpisano
Copy link
Owner Author

bpisano commented Aug 2, 2019

Yes I updated the project for Xcode 11 beta 5 a few hours ago. I tried on a small project and it works. But doing the exact same things in this projects doesn’t work 🤔

@bpisano
Copy link
Owner Author

bpisano commented Dec 8, 2019

Resolved in my last commit.

@bpisano bpisano closed this as completed Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants