TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Apache 2 |
ReleasedLast Release | Dec 2014 |
Maintained by Dalton Cherry.
FontAwesome-iOS takes the amazing font awesome (see that here: FontAwesome ) and makes it a simple category to make embedding the icons simple.
Requires that you embed and use the Font Awesome font in your app.
Requires at least iOS 5/OSX 10.7 or above. Also required is: https://github.com/daltoniam/FontAwesome-iOS.
How to add a custom font to iOS app:
Also see this:
http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/
If you get lost.
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 100, 44)];
label.font = [UIFont fontWithName:@"FontAwesome" size:20];
label.text = [NSString awesomeIcon:FaTwitter];
The recommended approach for installing FontAwesome-iOS is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation.
via CocoaPods
Install CocoaPods if not already available:
$ [sudo] gem install cocoapods
$ pod setup
Change to the directory of your Xcode project, and Create and Edit your Podfile and add FontAwesome-iOS:
$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
platform :ios, '5.0'
# Or platform :osx, '10.7'
pod 'FontAwesome-iOS'
Install into your project:
$ pod install
Open your project in Xcode from the .xcworkspace file (not the usual project file)