|
In the learning content for iOS 16 and SwiftUI, it is shown that
This infers the use of a simple Hashable or Equatable model, as inferred, since this example uses native types. In my case, something I had developed for iOS 15, no longer works when I migrate my view hierarchy to I don't see how I can easily make my SwiftUI views, which require use of ObservedObjects (could also be derived from StateObjects, but that's neither here nor there for the question), adapt to the new This is my minimally producible example:
|
|
I believe I have an initial answer that works - but certainly not sure if its a best practice. Definitely open to opinions and improvement suggestions! Thank you for viewing.
|
|
FYI, when Apple identifies a feature as "deprecated", that means they intend to eliminate it in some unspecified future version of the OS. Deprecated features generally continue to work for at least an additional year, sometimes two or three. The Apple documentation for NavigationView says it is supported in iOS 16 and MacOS 13. So you can take your time learning NavigationStack without any immediate imperative to migrate existing projects. |
SPONSORED Thorough mobile testing hasn’t been efficient testing. With Waldo Sessions, it can be! Test early, test often, test directly in your browser and share the replay with your team.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.