相关疑难解决方法(0)

UIApplicationShortcutItem - 我可以使用从Web下载的图像作为UIApplicationShortcutIcon吗?

我正在设置一些3D Touch功能,并希望使用从网络下载的图像(可以通过SDWebImage缓存访问)作为音频封面图像UIApplicationShortcutItem,就像Apple的音乐应用程序一样(见截图).

Apple Music截图

这可能吗?据我所知,它看起来并不是因为我无法将图像放入应用程序包中?我猜Apple正在做一些开发人员无法做到的事情?

UIApplicationShortcutItem的文档只有以下内容:

// Create an icon using a system-defined image.
+ (instancetype)iconWithType:(UIApplicationShortcutIconType)type;

// Create an icon from a custom image.
// The provided image named will be loaded from the app's bundle
// and will be masked to conform to the system-defined icon style.
+ (instancetype)iconWithTemplateImageName:(NSString *)templateImageName;
Run Code Online (Sandbox Code Playgroud)

ios 3dtouch

7
推荐指数
1
解决办法
1136
查看次数

标签 统计

3dtouch ×1

ios ×1