Code Monkey home page Code Monkey logo

fontawesome.swift's Introduction

FontAwesome.swift CI Status

Use Font Awesome in your Swift projects

Installation

  • Drag and drop FontAwesome.otf and FontAwesome.swift files into your project

Examples

FontAwesome icon in label

label.font = UIFont.fontAwesomeOfSize(200)
label.text = String.fontAwesomeIconWithName(FontAwesome.Github)

let attributes = [NSFontAttributeName: UIFont.fontAwesomeOfSize(20)] as Dictionary!

FontAwesome icon in button

button.titleLabel?.font = UIFont.fontAwesomeOfSize(30)
button.setTitle(String.fontAwesomeIconWithName(.Github), forState: .Normal)

FontAwesome icon as navigation bar item

leftBarButton.setTitleTextAttributes(attributes, forState: .Normal)
leftBarButton.title = String.fontAwesomeIconWithName(.Github)

FontAwesome icon as toolbar item

toolbarItem.setTitleTextAttributes(attributes, forState: .Normal)
toolbarItem.title = String.fontAwesomeIconWithName(.Github)

FontAwesome icon as a (tabbaritem's) image

tabBarItem.image = UIImage.fontAwesomeIconWithName(.Github, size: CGSizeMake(30, 30), textColor: UIColor.blackColor())

Requirements

iOS 7 or later.

License

  • FontAwesome.otf file licensed under SIL OFL 1.1
  • FontAwesome.swift licensed under MIT

fontawesome.swift's People

Contributors

thii avatar marcelofabri avatar hendx avatar prrrnd avatar benchr267 avatar pib02 avatar katunch avatar

Stargazers

Robert Bevilacqua avatar

Watchers

James Cloos avatar Robert Bevilacqua avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.