Use Font Awesome in your Swift projects
- Drag and drop
FontAwesome.otf
andFontAwesome.swift
files into your project
label.font = UIFont.fontAwesomeOfSize(200)
label.text = String.fontAwesomeIconWithName(FontAwesome.Github)
let attributes = [NSFontAttributeName: UIFont.fontAwesomeOfSize(20)] as Dictionary!
button.titleLabel?.font = UIFont.fontAwesomeOfSize(30)
button.setTitle(String.fontAwesomeIconWithName(.Github), forState: .Normal)
leftBarButton.setTitleTextAttributes(attributes, forState: .Normal)
leftBarButton.title = String.fontAwesomeIconWithName(.Github)
toolbarItem.setTitleTextAttributes(attributes, forState: .Normal)
toolbarItem.title = String.fontAwesomeIconWithName(.Github)
tabBarItem.image = UIImage.fontAwesomeIconWithName(.Github, size: CGSizeMake(30, 30), textColor: UIColor.blackColor())
iOS 7 or later.
- FontAwesome.otf file licensed under SIL OFL 1.1
- FontAwesome.swift licensed under MIT