We have extended UILabel to be able to apply standard fonts and colors for all uses of a given label type in our apps. Eg.
@interface UILabelHeadingBold : UILab
From Apple documentation :
To support appearance customization, a class must conform to the UIAppearanceContainer protocol and relevant accessor methods must be marked with UI_APPEARANCE_SELECTOR.
For example in UINavigationBar.h
, tintColor
is marked with UI_APPEARANCE_SELECTOR
@property(nonatomic,retain) UIColor *tintColor UI_APPEARANCE_SELECTOR;
But in UILabel.h you can see that the textColor
and font
propertys are not marked with UI_APPEARANCE_SELECTOR but somehow it works when added in Interface Builder (following the documentation it shouldn't work at all).