Checking for availability of iOS 15 in a SwiftUI view body

Checking for availability of iOS 15 in a SwiftUI view body

When you use a SwiftUI modifier that was added in iOS 15, you'll get an error in projects that are configured to be compatible with older iOS versions:

[…]

↗ Dave DeLong: Simplifying Backwards Compatibility in Swift ↗ How to use iOS15-specific modifiers in SwiftUI on iOS 14 and earlier? ↗ SwiftUI: using view modifiers between different iOS versions