- Various IconFonts (FontAwesome, ionicons, googleMaterialDesignIcons)
- Enum-base mapping
- Support IBDesignable
label.setIcon(icon: .googleMaterialDesign(.settings), size: 30)
button.setIcon(icon: .fontAwesome(.heart), forState: .normal)
textField.setRightViewIcon(icon: .fontAwesome(.addressBook))
textField.setLeftViewIcon(icon: .fontAwesome(.star))
stepper.setIncrementIcon(icon: .ionicons(.alert), forState: .normal)
stepper.setDecrementIcon(icon: .ionicons(.leaf), forState: .normal)
slider.setMinimumValueIcon(icon: .fontAwesome(.home))
slider.setMaximumValueIcon(icon: .fontAwesome(.key))
imageView.setIcon(icon: .fontAwesome(.star), color: .orange, size: CGSize(width: 44, height: 44))
segmentedControl.setIcon(icon: .googleMaterialDesign(.shop), forSegmentAtIndex: 0)
segmentedControl.setIcon(icon: .googleMaterialDesign(.openInNew), forSegmentAtIndex: 1)
- Add UI Element into Storyboard.
- Rename it to
IconFontXXX
. (supported classes are listed below) - Open inspecter and fill iconfont id (ex: fa-check, ion-ios-email) to
icon Id
placeholder.
- IconFontLabel (UILabel)
- IconFontStepper (UIStepper)
- IconFontSlider (UISlider)
- IconFontImageView (UIImageView)
- IconFontTextField (UITextField)
- IconFontSegmentedControl (UISegmentedControl)
- IconFontButton (UIButton)
- Swift4
CocoaPods is a dependency manager for Cocoa projects.
To integrate IconFontStack into your Xcode project using CocoaPods, specify it in your podfile
:
target 'YourProject' do
use_frameworks!
pod 'IconFontStack', '~> 0.1'
end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate IconFontStack into your Xcode project using Carthage, specify it in your Cartfile
:
github "kentya6/IconFontStack" >= 0.1
- Add
Source
folder into your Xcode project. Folder Link - Add .swift file included
Source
folder toCompile Sources
.
The MIT License (MIT)
Copyright (c) 2017 Kengo YOKOYAMA
- Fork it (http://github.com/kentya6/IconFontStack/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request