Skip to content

warmwind/Ionicons.swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ionicons.swift

Use Ionicons in you swift projects. The similar to FontAwesome.swift

Installation

  • Drag and drop Ionicons.ttf and Ionicons.swift files into your project

Examples

Ionicons icon in label

label.font = UIFont.ioniconOfSize(200)
label.text = String.ioniconWithName(Ionicons.SocialGithub)

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

Ionicons icon in label from css class name

label.font = UIFont.ioniconOfSize(200)
label.text = String.ioniconWithCode("ion-alert")

Ionicons icon in button

button.titleLabel?.font = UIFont.ioniconOfSize(30)
button.setTitle(String.ioniconWithName(.SocialGithub), forState: .Normal)

Ionicons icon as navigation bar item

leftBarButton.setTitleTextAttributes(attributes, forState: .Normal)
leftBarButton.title = String.ioniconWithName(.SocialGithub)

Ionicons icon as toolbar item

toolbarItem.setTitleTextAttributes(attributes, forState: .Normal)
toolbarItem.title = String.ioniconWithName(.SocialGithub)

Requirements

iOS 7 or later.

License

  • Ionicons.ttf file licensed under MIT
  • Ionicons.swift licensed under MIT

About

Use Ionicons in you swift projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages