Most, if not all, of the new iOS 16 features in SwiftUI will only be available from iOS 16 onwards. This is what Apple tends to do every release, so you will have to wait for your minimum deployment target to catch up with the version you need features from if you don’t want to have a lot of if-available checks.
Saying this, there are some features from earlier versions of SwiftUI that, even though have been replaced, will still work on the latest versions.
For example, in iOS 13-14 you would style a List like this:
.listStyle(PlainListStyle())
Although in iOS 15 it was reworked to this:
.listStyle(.plain)
the older approach will still work.
Furthermore, NavigationView has only been soft-deprecated so will continue to work as expected on iOS 16.
Check the documentation to see the minimum platform deployment information for each API.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: