0x01 這也需要討論?
不就是 label.textColor = [UIColor redColor];
0x02 另外的方法呢?
用setValue:forKey:
[label setValue:[UIColor greenColor] forKey:@"textColor"];
0x03 還有嗎?
用performSelector:withObject:
[label3 performSelector:@selector(setTextColor:) withObject:[UIColor blueColor]];
0x04 其實還有
[label setValue:[UIColor blueColor] forKey:@"color"];
[label performSelector:@selector(setColor:) withObject:[UIColor blueColor]];
對應(yīng)的方法:setColor:
雖然系統(tǒng)沒提供出來
但內(nèi)部是支持的
0x05 更多
測試過UITextField、UITextView
不支持方法:setColor:
看來是UILabel獨有的
# 一行代碼搞定視圖圓角
https://github.com/xjh093/JHViewCorner