Set UIButton title UILabel font size programmatically

前端 未结 18 3048
灰色年华
灰色年华 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:08

    this may help :

    [objBtn.titleLabel setFont:[UIFont fontWithName:@“fontname” size:fontsize]];
    

提交回复
热议问题