How to globally observe @Dependency value updates in UIKit using Combine? #1703
Replies: 2 comments 1 reply
-
I've updated the description so it gets to the root of what I'm trying to figure out :) |
Beta Was this translation helpful? Give feedback.
-
You could use a Although, this usage is not canonized in TCA. It is expected that the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have
@Dependency(\.font) appFont
within a view controller that I want to observe, so any label will automatically update the font when a change occurs:Is it possible to use
@Dependency
such that any MyViewController1 instances in the view stack (which is possible by pushing via navigation controller) that modifiesfont
will trigger subscribers of all the other instances to update their labels accordingly?Beta Was this translation helpful? Give feedback.
All reactions