Skip to content

Latest commit

 

History

History
84 lines (53 loc) · 1.59 KB

README.md

File metadata and controls

84 lines (53 loc) · 1.59 KB

HS-Font-Icons

Easily use resolution-independant font-icons

Currently Supports

  • Google Material Icons (3.0.1)
  • Font Awesome (5.3)

You can easily add your own font icon families (and please send a pull request if you do!)

Requirements

  • iOS 8.0+
  • Xcode 10
  • Swift 5.0

Installation

CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'HS-Font-Icons'

Do not forget to import to your swift files where you want to use this library:

import HS_Font_Icons

Usage

UILabel

    labelName.setIcon(GMDIcon.public)

    labelName.textColor = UIColor.redColor()

UIButton

    buttonName.setIcon(GMDIcon.public)

    //or if you want to set an icon size and/or specify the state, use:
    buttonName.setIcon(GMDIcon.public, forState: .highlighted, iconSize: 30)

    buttonName.setTitleColor(UIColor.redColor(), forState: .normal)

UIBarButtonItem

    //Standard font size
     barName.setIcon(GMDIcon.public)

    //Custom font size
    barName.setIcon(GMDIcon.public, iconSize: 35)

    barName.tintColor = UIColor.redColor()

Original Based on Google-Material-Design-Icons

Patrik Vaberer, [email protected]

Licence

HS-Font-Icons Icons is available under the MIT license. See the LICENSE file for more info.