成为 bundle 中使用的 SF-Symbols 的一部分并编译为可执行文件?还是只有引用,实际图标由用户的操作系统提供?
最佳答案
符号存储在操作系统中的某个位置。您的应用仅包含对它们的“引用”。
根据this post ,iPhone模拟器中的SF符号位于:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/
Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework/
CoreGlyphs.bundle/Assets.car
请注意,这是在“iOS.simruntime”内部,这是存储模拟 iOS 操作系统的地方。我想在真正的 iOS 设备上,它将位于“RuntimeRoot”之后的路径:
/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/Assets.car
Peeking into this Assets.car file ,我们可以看到它有这样的条目:
{
"AssetType" : "Image",
"BitsPerComponent" : 8,
"ColorModel" : "Monochrome",
"Colorspace" : "gray gamma 22",
"Compression" : "deepmap2",
"DeploymentTarget" : "2019",
"Encoding" : "Gray",
"Glyph Size" : "Medium",
"Glyph Weight" : "Regular",
"Idiom" : "universal",
"Name" : "square.lefthalf.filled",
"NameIdentifier" : 54903,
"Opaque" : false,
"PixelHeight" : 27,
"PixelWidth" : 27,
"RenditionName" : "square.lefthalf.filled.svg",
"Scale" : 2,
"SHA1Digest" : "2299C5EE9722FDB79BC6BA4458980605076D4356BA01FC2107228DC99D53E42A",
"SizeOnDisk" : 338,
"State" : "Normal"
},
请注意,“名称”属性都是 SF 符号名称。
关于ios - SF-Symbols 位于哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76684913/