IoniconsKit:让 UIImage / UIFont 更方便地使用自定义图标

1,491 阅读1分钟
原文链接: github.com

IoniconsKit internally use ionicons.ttf v2.0.1

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Ionicons as UILabel

someLabelfont  UIFontionicon(of: )
someLabeltext  Stringionicon(with: socialTwitter)

Ionicons as UIImage

someImageViewimage  UIImageionicon(with: socialFacebook, textColor: UIColororange, size: CGSize(width: , height: ))

For another icons, plaease see the source[3], or build Example App.

Requirements

iOS 8 or later. Swift3.0 or later.

Installation

IoniconsKit is available through CocoaPods[4] or Carthage[5].

CocoaPods

pod IoniconsKit

Carthage

github "keitaoouchi/IoniconsKit"

for detail, please follow the Carthage Instruction

Author

keita.oouchi, keita.oouchi@gmail.com[6]

License

ionicons.ttf[7] file is licensed under MIT license[8].

IoniconsKit is available under the MIT license. See the LICENSE file for more info.