UILabel font : bold and italic
20,263
Solution 1
try this code...
UIFont *yourFont = [UIFont fontWithName:@"Helvetica-BoldOblique"
size:[UIFont systemFontSize]];
lblTitle.font = yourFont;
you can use also another fontName for BoldItalik like.
Optima-BoldItalic
,TimesNewRomanPS-BoldItalicMT
,Baskerville-BoldItalic
,HelveticaNeue-BoldItalic
,etc...
Solution 2
There are several font that contains Bod+Italic in themselves you can use those fonts... One frequently for an example is
lblTitle.font = [UIFont fontWithName:@"Arial-BoldItalicMT" size:16.0f];
others are :
- TrebuchetMS-Bold
- Helvetica-BoldOblique
- This link will help you.
Related videos on Youtube
Author by
user7388
Updated on November 03, 2020Comments
-
user7388 over 3 years
Possible Duplicate:
How do I set bold and italic on UILabel of iPhone/iPad?I am trying to make UILabel font bold and italic both using system font, but I cant use these both style at a time. so is it possible to make font bold and italic using system font? here is my code,
lblTitle.font = [UIFont italicSystemFontOfSize:[UIFont systemFontSize]];
or
lblTitle.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]];
I want my font Bold and Italic both. Can anyone help me? Thank you in advance.
-
filou over 11 yearsMaybe this could help: stackoverflow.com/questions/4713236/…
-
Anoop Vaidya over 11 yearsoops, spelling mistake in Arial... it was Ariel :( my bad luck... you can use other fonts from the link provided.
-
Scuttle over 9 yearsAny one know what the System Font Bold answer is to this? I can't find where it says, "Apple System Font is ..."
-
-
Admin over 11 yearsThe first one won't do what OP wants - the 2nd call will overwrite the first and the font will be italic only.
-
Anoop Vaidya over 11 yearsok, i am removing that one :)