if let sfSymbolsBundle = Bundle(identifier: "com.apple.SFSymbolsFramework"),
let bundlePath = sfSymbolsBundle.path(forResource: "CoreGlyphs", ofType: "bundle"),
let bundle = Bundle(path: bundlePath),
let resourcePath = bundle.path(forResource: "symbol_search", ofType: "plist"),
let plist = NSDictionary(contentsOfFile: resourcePath) {
/// keys in plist are names of all available symbols
}
2条答案
按热度按时间j13ufse21#
您可以从SF Symbols应用程序中复制它们(
cmd+A
用于选择所有名称,cmd+shift+c
用于复制所有名称,粘贴到文本文件,并轻松地将名称重构为Image(systemName: "NAME")
。r3i60tvu2#
这是可能的。此代码通过App Store审核流程后不提供任何形式的保证。