I have a struct UI model. I create this model on ViewModel. I put an example below.
TextRow(title: "Come", font: .myFont(.bold, size: 14), color: .appBlack, alignment: .center)
I use that model in a table view cell. When I change the theme, .appBlack is not updated. I tried table view reloading data but it doesn't work. How can I update .appBlack? I want different colors light and dark modes. I read one more article but I don't find any solution to that issue.
I've tried this method but it doesn't update it because I've created my model in ViewModel.
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {}
How can I fix this issue?
Thanks for help