Post

Replies

Boosts

Views

Activity

Reply to SwiftUI picker jumps during state var update
Thanks for the detailed response, that was very helpful!I've found that while having a @State variable in your view struct (but not the view body) doesn't cause the view to be re-rendered, @ObservedObject and @EnvironmentObject don't behave the same way. Adding either of those to the view struct will cause the view to be updated when the variable changes, even if not referenced by the body. (Let me know if I'm missing something here, because this behavior isn't intuitive to me, so there may be more to it.)
Dec ’19