将SF Symbols系统映像用于静态UIApplicationShortcutItem [英] Use SF Symbols system image for static UIApplicationShortcutItem

查看:142
本文介绍了将SF Symbols系统映像用于静态UIApplicationShortcutItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在指定主屏幕快速操作时,在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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆