make UILabel's text bold

后端 未结 6 1230
梦毁少年i
梦毁少年i 2021-01-31 01:32

I want to make UILabel\'s text bold

infoLabel=[[UILabel alloc]initWithFrame:CGRectMake(90,150, 200, 30)];
[infoLabel setText:@\"Drag 14 more Flavors\"];
[infoLab         


        
6条回答
  •  感动是毒
    2021-01-31 02:14

    For swift users this should work:

    myLabel.font = UIFont.boldSystemFont(ofSize: 12.0)
    

    or if you'd like to use a different font:

    myLabel.font = UIFont(name:"HelveticaNeue-Bold", size: 12.0)
    

提交回复
热议问题