is a microblog
home archives search feed blogroll

Default Styling Of iOS Views

The default styling of a view can be set through appearance.

[[UILabel appearance] setColor:[UIColor redColor]];
[[UILabel appearanceWhenContainedIn:[UITableViewCell class]] setColor:[UIColor blueColor]];

This means you don’t have to manually style all instances of a view or have to subclass the view just to style it.

Posted on 2018-02-07   #objectivec     #til  

← Next post    ·    Previous post →