剑客
关注科技互联网

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

IoniconsKit

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

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

someLabel.font = UIFont.ionicon(of: 18)
someLabel.text = String.ionicon(with: .socialTwitter)

Ionicons as UIImage

someImageView.image = UIImage.ionicon(with: .socialFacebook, textColor: UIColor.orange, size: CGSize(width: 18, height: 18))

For another icons, plaease see thesource, or build Example App.

Requirements

iOS 8 or later. Swift3.0 or later.

Installation

IoniconsKit is available through CocoaPods orCarthage.

CocoaPods

pod "IoniconsKit"

Carthage

github "keitaoouchi/IoniconsKit"

for detail, please follow theCarthage Instruction

Author

keita.oouchi, keita.oouchi@gmail.com

License

ionicons.ttf file is licensed underMIT license.

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

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址