Allowing user input in SwiftUI Alert

Hi,

I would like to make an Alert box in SwiftUI that allows user to type text and validate or cancel.

The issue is that there is no option in the Alert functionality of SwiftUI to allow this kind of behavior.

In order to achieve this I have to make my own implementation with UIAlertController from UIKit.

Will this feature be included later in the Alert view of SwiftUI? Do we know anything about it?

Thanks.

There is detailed answer here to overcome SwiftUI limits. Maybe that's what you did.

https://stackoverflow.com/questions/56726663/how-to-add-a-textfield-to-alert-in-swiftui

You could file a bug report for enhancement.

The right place to make such a request is Feedback Assistant:

https://feedbackassistant.apple.com

Allowing user input in SwiftUI Alert
 
 
Q