问题描述
在指定主屏幕快速操作时,在Info.plist中的UIApplicationShortcutItems
中,是否可以使用SF Symbols中的系统映像?
When specifying home screen quick actions, UIApplicationShortcutItems
, in your Info.plist, is there a way to use a system image from SF Symbols?
注意到可用的iOS密钥的文档除了指定UIApplicationShortcutItemIconType
中的预定义枚举例之一(例如UIApplicationShortcutIconTypeSearch
)之外,没有指定执行此操作的密钥.
The docs noting the available iOS keys doesn't specify a key to do this, besides specifying one of the predefined enum cases from UIApplicationShortcutItemIconType
such as UIApplicationShortcutIconTypeSearch
.
通过新的初始化程序UIApplicationShortcutIcon.init(systemImageName: String)
创建动态快速动作时,可以使用系统映像.是否有一个Info.plist键可用于静态快速操作?
It is possible to use a system image when creating dynamic quick actions via a new initializer UIApplicationShortcutIcon.init(systemImageName: String)
. Is there a Info.plist key that allows this for static quick actions?
推荐答案
在您的Info.plist中使用UIApplicationShortcutItemIconSymbolName
代替UIApplicationShortcutItemIconFile
.
Use UIApplicationShortcutItemIconSymbolName
instead of UIApplicationShortcutItemIconFile
in your Info.plist.
这篇关于将SF Symbols系统映像用于静态UIApplicationShortcutItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!