Set UIFont style(Bold,Italic,Light,Oblique and combo).
- HLLFont extends UIFont using category.
- Use 1 method to set style
- Use combo style, like (BoldOblique)
- If not find font, return nil.
+ (UIFont*)fontWithFont:(UIFont*)font style:(NSString*)style.Add pod 'HLLFont' to your Podfile or pod 'HLLFont', :head if you're feeling adventurous.
Important note if your project doesn't use ARC: you must add the -fobjc-arc compiler flag to UIFont+HLLFont.m in Target Settings > Build Phases > Compile Sources.
- Drag the
HLLFontfolder into your project. - Import
UIFont+HLLFont.h
(see sample Xcode project in /HLLFontDemo)
font=[UIFont fontWithFont:font style:UIFONT_BOLD];For exmaple:setting combo style with bold and oblique
font=[UIFont fontWithFont:font style:[UIFONT_BOLD stringByAppendingString:UIFONT_OBLIQUE]];