Ionicons 集成到 Swift 和 iOS。
为 Swift 3.0 构建 - 对于 Swift 的早期版本,请使用 swift\1.2
和 swift\2.0
分支。
enum
类型和两个方法。UIImage
或 UILabel
生成图标Carthage:将 github tidwall/IoniconsSwift
添加到您的 Cartfile
。
CocoaPods:将 pod 'IoniconsSwift', :git => 'http://github.com/cdebortoli/IoniconsSwift.git', :branch => 'cocoapods'
添加到您的 Podfile
。
import IoniconsSwift
// Square UIImage of an icon.
let image = Ionicons.alert.image(35)
let image = Ionicons.iosClock.image(35, color: UIColor.greenColor())
// Square UILabel
let label = Ionicons.alert.label(35)
let label = Ionicons.iosClock.label(35, color: UIColor.greenColor())
Josh Baker @tidwall
IoniconsSwift 源代码受 MIT 许可证保护。