Latest 1.0.0
Homepage https://github.com/daaavid/SwiftFontIcons
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Elegantly use ZMDI (Material Design Iconic Font) and FontAwesome icons in Swift for iOS.

CI Status
Version
License
Platform

Usage

Use is easy as pie; type the icon code you want to use followed by .zmdi or .fa and then .icon or .image. This will return an optional String and UIImage, respectively. If you’re using .icon, remember to set the font for the label / button / whatever beforehand.

label.font = .zmdi(size: 20)
label.text = "zmdi-remote-control".zmdi.icon

label.font = .fa(size: 20)
label.text = "fa-user".fa.icon
imageView.image = "zmdi-remote-control".zmdi.image(color: .white, size: imageView.frame.size)
imageView.image = "fa-user".fa.image(color: .white, size: imageView.frame.size)

Prefacing the icon code with fa or zmdi is unnecessary; you can drop it off if you want.

label.text = "address-book".fa.icon
label.text = "satellite".zmdi.icon

Check out this Example Code for more usage examples.

Example

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

Installation

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

pod "SwiftFontIcons"

Author

daaavid, [email protected]

License

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

Latest podspec

{
    "name": "SwiftFontIcons",
    "version": "1.0.0",
    "summary": "Elegantly use ZMDI (Material Design Iconic Font) and FontAwesome icons in Swift for iOS.",
    "homepage": "https://github.com/daaavid/SwiftFontIcons",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "daaavid": "[email protected]"
    },
    "source": {
        "git": "https://github.com/daaavid/SwiftFontIcons.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SwiftFontIcons/Classes/**/*.{swift}",
    "resources": "SwiftFontIcons/Fonts/**/*.{ttf}",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This