Swift和Oc设置Button的文字颜色

2021-08-03  本文已影响0人  wenju

1.Swift实现

myButton.setTitleColor(greenColor, for: .normal)

2.Oc实现

[myButton setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
上一篇 下一篇

猜你喜欢

热点阅读