I am trying to use UIAppearanceto get a uniform color theme in my iOS app. For example, I am trying to set the text color for all objects UILabelas follows:
[[UILabel appearance] setTextColor:[UIColor colorWithRed:0.7 green:0.07 blue:0.12 alpha:1]];
This works fine for all objects statically defined in my storyboard / XIB. However, sometimes I need to dynamically create a UILabel in a view. In these cases, UIAppearance is not used. Instead, the default text color (black) is used.
Has anyone come across this problem / found a way to overcome it, besides resorting to the old "install each item manually" approach?
source
share