Google-Material-Design-Icons-Swift 1.0.1

Google-Material-Design-Icons-Swift 1.0.1

测试已测试
语言语言 SwiftSwift
许可协议 MIT
发布上次发布2015年9月
SPM支持SPM

Patrik Vaberer维护。




Google Material Design Icons Swift

Font Awesome Swift

关注我:@vaberer

我喜欢★。别忘了为这个超级方便的库点赞。

还有一个非常流行的Font Awesome库,您一定会喜欢!

Google Material Design Icons Swift库适用于iOS。不再需要图像图标。使用Google Material Design Icons Swift库非常简单。查看演示应用程序,该应用程序显示了所有图标及其名称,或者只需访问Google Design Material Icons

要求

  • iOS 8.0+
  • Xcode 7

安装

要在Swift 1.2中使用Font Awesome

pod 'Google-Material-Design-Icons-Swift', :git => 'https://github.com/Vaberer/Google-Material-Design-Icons-Swift.git', :branch => 'swift1.2'

手动安装

  1. GMDIcon.swiftGMDIcons.ttf文件复制到您的项目中
  2. 检查在项目中导入GMDIcons.ttf,在“项目”>“目标”>“复制 Bundle 资源”中导入

用法

添加图标超简单的方式。

UILabel

    labelName.GMDIcon = GMDType.GMDPublic

    //or if you want to set an icon size, use:
    labelName.setGMDIcon(GMDType.GMDPublic, iconSize: 30)

    labelName.textColor = UIColor.redColor()

UIButton

    buttonName.setGMDIcon(GMDType.GMDPublic, forState: .Normal)

    //or if you want to set an icon size, use:
    buttonName.setGMDIcon(GMDType.GMDPublic, iconSize: 35, forState: .Normal)

    buttonName.setTitleColor(UIColor.redColor(), forState: .Normal)

UIBarButtonItem

    //Standard font size
    barName.GMDIcon = GMDType.GMDPublic

    //Custom font size
    barName.setGMDIcon(GMDType.GMDPublic, iconSize: 35)

    barName.tintColor = UIColor.redColor()

作者

Patrik Vaberer,[email protected]

许可协议

Google Material Design Icons Swift是以MIT许可协议提供的。有关更多信息,请参阅LICENSE文件。