SwiftUI: Alert
Alert is equivalent to UIKit’s UIAlertView in SwiftUI. This post is about creating and presenting an alert in SwiftUI.
Hint: This post has been updated to Swift 5.7 and Xcode 14.2
Creating an alert in SwiftUI
Creating an alert in SwiftUI is very straightforward:
Alert(title: Text(