How to set the title text color of UIButton?

后端 未结 7 1410
温柔的废话
温柔的废话 2020-12-13 05:18

I tried changing the colors of the text for a button, but it\'s still staying white.

isbeauty = UIButton()
isbeauty.setTitle(\"Buy\", forState: UIControlStat         


        
7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 06:03

    Example in setting button title color

    btnDone.setTitleColor(.black, for: .normal)
    

提交回复
热议问题