UILabel - setting font - typeface programmatically in iPhone
iphone, uilabel
Solution
You will need to use the name of the `bold` font within the family. To find out if there is a `bold` version of American Typewriter, try outputting
[UIFont fontNamesForFamilyName:@"AmericanTypewriter"]
to the console.
In this case, you should use `"AmericanTypewriter-Bold"`.
[UIFont fontNamesForFamilyName:@"AmericanTypewriter-Bold"]
Problem
I have following code in my Application. ``` tmp=[[UILabel alloc] initWithFrame:label1Frame]; tmp.tag=1; tmp.textColor=[UIColor blackColor]; [tmp setFont:[UIFont fontWithName:@"American Typewriter" size:18]]; tmp.backgroundColor=[UIColor clearColor]; [cell.contentView addSubview:tmp]; [tmp release]; ``` Now, I need to know, ======> how to set "Typeface=bold" through code?