GoogleMD Icons
1.0.0
使用Google材料设计图标中的一种简单方法。
确保您通过运行具有最新版本的可可录。
$ gem install cocoapods通过运行来更新您的本地规格存储库:
$ pod repo update将以下几行添加到您的Podfile :
target 'YourProject' do
use_frameworks!
pod 'GoogleMD-Icons'
end然后运行以下命令
$ pod install您可以通过将图书馆导入到任何需要的地方来开始使用库
import GoogleMD_Iconsimport GoogleMD_Icons
// Set icon
imageView . image = UIImage . googleMDIcon ( icon : . accountBalance , size : CGSize ( width : 150.0 , height : 150.0 ) )
// Set icon with color
imageView . image = UIImage . googleMDIcon ( icon : . accountBalance , size : CGSize ( width : 150.0 , height : 150.0 ) , color : . orange )
// Set icon with color and icon code
imageView . image = UIImage . googleMDIcon ( icon : GoogleMDIconType ( name : " account_balance " ) ! , size : CGSize ( width : 150.0 , height : 150.0 ) , color : . orange )import GoogleMD_Icons
// Set icon
imageView = UIImageView . googleMDIcon ( icon : . accountBalance , size : CGSize ( width : 150.0 , height : 150.0 ) )
// Set icon with color
imageView = UIImageView . googleMDIcon ( icon : . accountBalance , size : CGSize ( width : 150.0 , height : 150.0 ) , color : . orange )
// Set icon with color and icon code
imageView = UIImageView . googleMDIcon ( icon : GoogleMDIconType ( name : " account_balance " ) ! , size : CGSize ( width : 150.0 , height : 150.0 ) , color : . orange ) Adam Golczak([email protected])
Googlemd-Icons可根据MIT许可获得。有关更多信息,请参见许可证文件。