TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Giovanni Lodi.
Speedup iOS app development with font based icons!
Via CocoaPods.
pod 'MTFontIcon'
or
pod 'MTFontIcon', ~> '1.0.0'
Add your .ttf
file to the project, naming it font-icon.ttf
Configure the icons-unicode matches in the MTFontIcon.plist
, which is structured like this
{
'font-icons': [
{'icon-name' : 'arrow-left', 'icon-code' : 'e000' },
{'icon-name' : 'arrow-right', 'icon-code' : 'e001' }
]
}
The icon code has to be in the hex format.
In your views use MTFontIconView
#import <MTFontIconFactory.h>
MTFontIconFactory *factory = [[MTFontIconFactory alloc] init];
MTFontIconView *arrow = [iconFactory iconViewForIconNamed:@'arrow-left' withSide:60.0f];
You can customize your icon like this:
arrow.background = [UIColor white];
arrow.color = [UIColor black];
arrow.shadowColor = [UIColor gray];
arrow.shadowOffset = CGSizeMake(1.0f, 1.0f);
icomoon.io is a really cool service that lets you aggregate font icons form different sets and your custom SVG as well, all in a single .ttf
Nothing else to say. Just generate your file, add it to the app and follow the instructions at the beginning of this section.
font-icon.ttf
.MTFontIconView
using Core Text
add_font.rb
, still WIP.MTFontIcon.plist
configuration. Single page webapp?
username/feature_name
Made with ♥ by @LiquidImage_ and @mokagio