Set UIButton title UILabel font size programmatically

前端 未结 18 3049
灰色年华
灰色年华 2020-12-07 07:16

I need to set the font size of the title UILabel of a UIButton programmatically.

18条回答
  •  醉梦人生
    2020-12-07 08:09

    This would be helpful

    button.titleLabel.font = [UIFont fontWithName:@"YOUR FONTNAME" size:12.0f]
    

提交回复
热议问题