How to set the title text color of UIButton?

后端 未结 7 1409
温柔的废话
温柔的废话 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:08

    set title color

    btnGere.setTitleColor(#colorLiteral(red: 0, green: 0, blue: 0, alpha: 1), for: .normal)
    

提交回复
热议问题