make UILabel's text bold

后端 未结 6 1065
梦毁少年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:21

    Try

    [infoLabel setFont:[UIFont fontWithName:@"Arial-BoldMT" size:16]];
    

    It may also be worth checking if the font you're trying to use is available on device

提交回复
热议问题