IoniconsKit
IoniconsKit 使用内部 ionicons.ttf v2.0.1
示例
要运行示例项目,首先克隆仓库,然后先从 Example 目录运行 pod install
。
将 Ionicons 作为 UILabel 使用
someLabel.font = UIFont.ionicon(of: 18)
someLabel.text = String.ionicon(with: .socialTwitter)
将 Ionicons 作为 UIImage 使用
someImageView.image = UIImage.ionicon(with: .socialFacebook, textColor: UIColor.orange, size: CGSize(width: 18, height: 18))
对于其他图标,请参阅 源代码,或构建示例应用程序。
要求
目标 | 版本 |
---|---|
iOS | => 10.0 |
Swift | => 5.0 |
安装
IoniconsKit 可通过 CocoaPods 或 Carthage 获取。
CocoaPods
pod "IoniconsKit"
Carthage
github "keitaoouchi/IoniconsKit"
详情请参照 Carthage 指南
作者
keita.oouchi, [email protected]
许可协议
ionicons.ttf 文件使用 MIT 许可协议。
IoniconsKit 在 MIT 许可协议下提供。详情请查看 LICENSE 文件。