SwiftUI Alerts - Buttons, TextFields, & Passing Errors @seanallen
SwiftUI Alerts - Buttons, TextFields, & Passing Errors  @seanallen
Uploaded April 2024 | Updated September 2026, 1 week ago
Go to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.

In this video I show you how to display various types of alerts in SwiftUI. We discuss multiple buttons with destructive and cancel button roles and how to use a TextField in an alert. Then I show you how to pass an Error into your alert modifier so your alerts can be dynamic.

My iOS Dev Courses:
seanallen.teachable.com/?video=2c1IQ0BT0PE

My Source Code:
seanallen.teachable.com/p/source-code-youtube-videos?video=2c1IQ0BT0PE

X (Twitter):
Sean Allen - twitter.com/seanallen_dev

Hired.com:
hired.com/x/1n01g

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Mark Moeyken’s SwiftUI Books:
bigmountainstudio.com/a/fzc51

Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803

RocketSim - Enhance Your Xcode Simulator:
gumroad.com/a/51797971/ftvbh

Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843

Timestamps:
0:00 - Types of Alerts
0:17 - Basic Alert
3:13 - Multiple Buttons Alert
4:55 - TextField in Alert
7:23 - Passing an Error to an Alert
10:26 - Dynamic UI based on Error

#swift #softwaredeveloper #iosdeveloper
SwiftUI Alerts - Buttons, TextFields, & Passing ErrorsXcode Tip - Save Time - Preview Variants #iosdeveloper #swift #xcodeYou should spam your users...just a littleThe Most Misused Design Pattern in Swift31 Xcode Tips & Tricks - 2023Xcode Tip - 3D View Debugging #iosdeveloper #swift #xcodeBleeding Edge AI Work, Whats New in Swift, Concurrency, Apple AdsXcode Tip - Single App Icon #iosdeveloper #swift #xcodeSwiftUI Bar Chart with Customizations | Swift ChartsNew Way to Format Dates in Swift (5.5)Swift in 2023, Better Pull Requests, Paywalls, SwiftUI Animations & MoreSwift: Dead Simple Formatting (Dates, Numbers, Currency, Measurement, Time)
Sean Allen |

SwiftUI Alerts - Buttons, TextFields, & Passing Errors

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER