[UILabel appearance]
首先要說(shuō)的額就是這個(gè)方法
沒(méi)看到不明白 看到的一眼就懂
設(shè)置全局 可以設(shè)置 label button textfield 等等等等
只要你想得到
在Appdelete中設(shè)置即可
下面附上一些常用方法
//設(shè)置全局label默認(rèn)背景顏色
[[UILabel appearance] setBackgroundColor:[UIColor redColor]];
//設(shè)置全局label默認(rèn)字體顏色
[[UILabel appearance] setTextColor:[UIColor redColor]];
//設(shè)置全局Button默認(rèn)字體顏色
[[UIButton appearance] setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
//設(shè)置全局cell默認(rèn)背景顏色
[[UITableViewCell appearance] setBackgroundColor:kClearColor];
//設(shè)置全局cell默認(rèn)字體顏色
[[UITableViewCell appearance] setTintColor:kNavBarThemeColor];
其他的也就這樣了 自己看著辦