Easily use ionicons in your native SDK iOS projects
Currently using ionicons 1.2.2
As of version ionicons v1.2.2, about half the icons are iOS 7 system icons, and the other half are flat icons in a similar style. The great thing about ionicons is it makes the system icons a lot handier and more customizable, while adding more icon options. Also, with ionicons-iOS you can use iOS 7 system icons in your native SDK iOS 5+ projects, so your designs will have a consistent appearance across all OS versions.
For available icons, look at ionicons-codes.h or browse them at the ionicons website.
Get the font:
UIFont *ionIconsFont = [IonIcons fontWithSize:30.0f];
Make a UILabel with an ionicons icon:
UILabel *label = [IonIcons labelWithIcon:icon_ionic size:20.0f color:[UIColor blackColor]];
Render an ionicons icon in a UIImage:
UIImage *icon = [IonIcons imageWithIcon:icon_ionic
iconColor:[UIColor redColor]
iconSize:60.0f
imageSize:CGSizeMake(90.0f, 90.0f)];
CocoaPods is great:
- add
pod 'ionicons'
to your Podfile pod install
- open the xcworkspace
- Modify your project's Info.plist file as described below
Non-CocoaPods is easy too:
- Drag the folder 'ionicons' with the source files into your project
- Modify your project's Info.plist file as described below
Modify your project's Info.plist file:
- Open your project's Info.plist file by clicking on the project in the Navigator on the left, then choosing 'Info'.
- Under 'Custom iOS Target Properties', click the last Key in the list, then click on the '+' icon.
- For the new key, type 'Fonts provided by application'.
- Twirl down the arrow icon, double-tap the right-most box to enter the string value, and type 'ionicons.ttf'.
I built this for inclusion in my app design templates available at TapTemplate
ionicons is released under the MIT license.
The stuff specific to ionicons-iOS is also released under the MIT license