by wlue · 13y ago · 0 comments
[[UILabel appearance] setStyleBlock:^(id view) {
UILabel *label = view;
label.backgroundColor = [UIColor clearColor];
}];
The advantage is that you can style properties that aren't supported by UIAppearance natively, since a block just gets run when the view is ready to be styled. You also can style subviews from the same block (ie. title label inside of a warning view should be red and bold).No comments yet.