I want to set the default text color for all UILabels in my app. I found this:
UILabel.appearance().textColor = UIColor.red
This works, but whe
There is also an alternative to what Muhammad suggested. The alternative is to use the UIAppearance proxy, but specify the classes where it would be applied to.
In that case, you would use it like this:
UILabel.appearanceWhenContainedInInstancesOfClasses([MyViewController.self, MyotherViewController.self]).textColor = UIColor.red
The above though, would only allow you to set the textColor your self in some classes. in those where the proxy is set to be enabled, you won't be able to set the text color.
It's up to you to choose which approach is better for your case