Latest 2.0.1
Homepage https://github.com/LiveUI/Awesome
License MIT
Platforms ios 9.0, tvos 9.0, osx 10.11, watchos 2.0
Authors

Awesome

Font Awesome
Slack
Version
License
Platform

Super easy to use library containing the brand new Font Awesome 5, completely redesigned for Swift 4

Slack

Get help using and installing this product on our Slack, channel #help-awesome

Installation

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

pod 'AwesomeEnum'

for Carthage just add:

github "LiveUI/Awesome"

Usage

Import will be slightly different for Cocoapods/Carthage. Sorry for the confusion of names but some unreasonable fellow has already registered an Awesome pod before us :).

Cocoapods

import AwesomeEnum

Carthage

import Awesome

All icons are available through autogenerated enums like this:

let image = Awesome.solid.handScissors.asImage(size: 40.0)
// or
let image = Awesome.brand.android.asImage(size: CGSize(width: 40, height: 40), color: .red, backgroundColor: .blue) // :trollface:
// or
let attributedText = Awesome.regular.envelopeOpen.asAttributedText(fontSize: 17, color: .red, backgroundColor: .blue)

Font Awesome Pro

The Font Awesome Free files are included and loaded for you out of the box. Font Awesome Pro licensing terms don’t allow to publish the font files however, so we can’t add those for you. As such you will need to manually add the fonts to your project and register them before using them:

// AppDelegate application(_:didFinishLaunchingWithOptions:)

// Load all fonts
AwesomePro.loadFonts(from: Bundle.main)

// Load only some fonts
AwesomePro.loadFonts(from: Bundle.main, only: [.brand, .solid])

The filenames have to match Font Awesome’s naming scheme (fa-brands-400.ttf, fa-light-300.ttf, fa-regular-400.ttf, fa-solid-900.ttf). You only have to include the fonts you are using.

Once the fonts are registered you can use the AwesomePro enum just as you’d use the Awesome enum, except that you now have access to all Font Awesome Pro icons.

Contributors

License

Awesome is available under the MIT license. See the LICENSE for more info. All fonts are property of Font Awesome!

Latest podspec

{
    "name": "AwesomeEnum",
    "version": "2.0.1",
    "summary": "Swift implementation of Font Awesome 5 and Font Awesome 5 Pro!",
    "swift_version": "4.2",
    "description": "Swift implementation of Font Awesome 5 and Font Awesome 5 Pro allows you to implement this amazing web font on iOS, tvOS and macOS devices easily!",
    "homepage": "https://github.com/LiveUI/Awesome",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ondrej Rafaj": "[email protected]"
    },
    "source": {
        "git": "https://github.com/LiveUI/Awesome.git",
        "tag": "2.0.1"
    },
    "social_media_url": "https://twitter.com/rafiki270",
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0",
        "osx": "10.11",
        "watchos": "2.0"
    },
    "source_files": "Classes/**/*",
    "resource_bundles": {
        "Awesome": [
            "Assets/*.ttf"
        ]
    },
    "ios": {
        "frameworks": [
            "UIKit",
            "CoreText",
            "CoreGraphics"
        ]
    },
    "tvos": {
        "frameworks": [
            "UIKit",
            "CoreText",
            "CoreGraphics"
        ]
    },
    "osx": {
        "frameworks": [
            "Cocoa",
            "CoreText",
            "CoreGraphics"
        ]
    },
    "watchos": {
        "frameworks": [
            "UIKit",
            "CoreText",
            "CoreGraphics"
        ]
    }
}

Pin It on Pinterest

Share This