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許可獲得。有關更多信息,請參見許可證文件。