/JQSwiftIcon

Icon Fonts on iOS using string interpolation

Primary LanguageSwiftMIT LicenseMIT

JQSwiftIcon

Build Status Version License Platform

Installation

JQSwiftIcon is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JQSwiftIcon"

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Cheat Sheets

First, check out the Cheat Sheets ####IMPORTANT: All clasess containing "_" or "-" have been replaced by "."

| Name | Prefix | Cheat Sheet | |---|---|---|---|---| | Material Icons | mat | Link | | Font Awesome | fa | Link | | Ion Icons | ii | Link | | Map Icons | mp | Link | | Octicons | oi | Link | | Open Iconic | inic | Link | | Themify | th | Link |

Placeholder Structure

###< Prefix >:< Icon Class >

##Usage

In your UILabel, UIButton or UITextField, set a text containing a placeholder anywhere you want the icon to be. Somethink like this

fa:building

Then you can choose between 2 ways you can use JQSwiftIcon. ####1. No Custom Class

Simply import JQSwiftIcon and call processIcons on any UILabel, UIButton or UITextField that has a placeholder.

myLabel.processIcons()

####2. Custom Class

The lazy way, just set your UILabel, UIButton class as JQIconLabel or JQIconButton, and thats it, your icons will be processed at runtime.

Author

Jose Quintero, jose.juan.qm@gmail.com

License

JQSwiftIcon is available under the MIT license. See the LICENSE file for more info.