Search code examples
iosobjective-cswiftuilabeluifont

How do I set bold and italic on UILabel of iPhone/iPad?


How do I set bold and italic on UILabel of iPhone/iPad? I searched the forum but nothing helped me. Could anyone help me?


Solution

  • sectionLabel.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:18];
    

    There is a list of font names that you can set in place of 'fontWithName' attribute.The link is here