Use a Switch To Display a Different Alert Based On Error Type
Daily Coding Tip 219
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…


