我正在使用3D Touch为我的iOS 9应用实现主屏幕快速操作。我有几个操作使用已定义的UIApplicationShortcutIconType枚举中的现有系统图标。
一个例子:
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeSearch</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Search for Parking</string>
<key>UIApplicationShortcutItemType</key>
<string>SEARCH</string>
</dict>
然而,对于我想要使用自定义图标的其中一个操作。我尝试将UIApplicationShortcutItemIconType字符串替换为我的图像资产名称,但这并不起作用。
对于使用UIApplicationShortcutIcon.iconWithTemplateImageName()创建动态操作很容易实现,但是此操作需要是静态的。
<string>
? - pkamb