If you are an iOS developer, you should face with so many icons in an application. You have to cut, resize or change the color of them to use with UIImageView, UIButton,… And it’ll be more difficult to control the title & image of an UIButton, than only control the attributed title with NSAttributedString.
Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.
I would like to introduce a library, which I’m using in many projects. Currently it supports Font-Awesome, Foundation icons, Zocial, and ionicons.
NSError *error; FAKFontAwesome *starIcon = [FAKFontAwesome iconWithIdentifier:@"fa-star" size:15 error:error]; [starIcon addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor]]
Use as attributed string:
self.label.attributedText = [starIcon attributedString];
Use as an image:
UIImage *iconImage = [starIcon imageWithSize:CGSizeMake(15, 15)];
Use as image (with multiple icons stacked together):
[UIImage imageWithStackedIcons:@[[FAKFontAwesome twitterIconWithSize:35], [FAKFontAwesome squareOIconWithSize:70]] imageSize:CGSizeMake(80, 80)];
You simply use the provided helper libraries to use the icon names as listed on the FontAwesome icon page.
Link to find the icon name:
Congratulation & Good luck !