The .alert
modifier takes a closure which returns an Alert
, which means a switch
can be used to return different values in different situations. Unlike a view, an Alert
isn’t a generic type that conforms to a protocol. An Alert
is actually just a struct that doesn’t conform to anything.
This means that there is no i…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.