MaterialDesignSymbol
2.8.6
Swift的圖標字體庫。目前支持GoogleMaterialDesignicons。 Objectivec版本在這裡。

該項目使用的字體
該項目中使用的字體的作者:Google鏈接:https://github.com/google/material-design-icons
創意共享歸因4.0國際(CC By 4.0)
import MaterialDesignSymbol
let symbol = MaterialDesignSymbol(text:MaterialDesignIcon.list48px, size:25)
symbol.addAttribute(attributeName: NSAttributedStringKey.foregroundColor, value: UIColor.red)
let iconImage = symbol.image(size: CGSize(width:25, height:25))或者
import MaterialDesignSymbol
let iconImage = MaterialDesignSymbol(icon: .viewHeadline48px, size: 30).image()
import MaterialDesignSymbol
titleLabel.font = MaterialDesignFont.fontOfSize(20)
titleLabel.text = MaterialDesignIcon.list48px對目標C的支持以2.3.2版本結束。如果您想從目標C打電話,請使用VER 2.3.2或更早。
@import MaterialDesignSymbol;
MaterialDesignSymbol *symbol = [[MaterialDesignSymbol alloc] initWithText:[MaterialDesignIcon home48px] size:30];
[symbol addAttributeWithAttributeName:NSForegroundColorAttributeName value:[UIColor blackColor]];
sampleImageView.image = [symbol imageWithSize:CGSizeMake(30, 30)];@import MaterialDesignSymbol;
sampleLabel.font = [MaterialDesignFont fontOfSize:20];
sampleLabel.text = [MaterialDesignIcon clear48px]; pod MaterialDesignSymbol