UIButton title text color

后端 未结 5 1934
刺人心
刺人心 2020-12-04 10:47

I\'m setting text color for UIButton

headingButton.titleLabel.textColor = [UIColor colorWithRed:36/255.0 
                                               


        
5条回答
  •  情深已故
    2020-12-04 10:58

    Besides de color, my problem was that I was setting the text using textlabel

    bt.titleLabel?.text = title
    

    and I solved changing to:

    bt.setTitle(title, for: .normal)
    

提交回复
热议问题