Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Mario Alberto Guzmán
@marioguzman@mastodon.social  ·  activity timestamp 3 days ago

Any #iOSDev that can help me w/ Focus Scene Values?

I have a SwiftUI View, “MyView” which has an @ Observable model object as a property of type MyDataModel. I use .focusedSceneValue modifier w/ this object.

As the user navigates the app, they encounter “MyView" multiple times each with diff data.

In my Commands, I have a property wrapper @ FocusedValue w/ said MyDataModel type for my command.

However, it only retains the 1st MyDataModel encountered. It never updates to the one being viewed.

  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.13 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login