动态 iPhone 应用程序图标?
日历应用程序可以...如何根据 iPod 或 iPod 应用程序设置中存储的信息更改应用程序图标?
编辑: 今天我意识到可以通过 sdk 访问捆绑包。 (至少有读取权限)如果我有图形 API(也许是 OpenGL),那么我就可以像这样修改图标。操作是:
- 从包中获取 icon.png。
- 修改它,
- 然后将其重新保存到捆绑包中。
这有道理吗?
The calender app does it... How can I make an app icon change based on stored info from the iPod or iPod app settings?
EDIT:
I realized today that it is possible to access bundles via the sdk. (At least read access) If I had a graphics API (OpenGL, perhaps) then I could possibly modify the icon like that. The operation would be:
- get icon.png from bundle.
- modify it
- resave it into the bundle.
Does that make sense?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
需要注意的是,苹果的日历应用程序实际上是硬编码到系统中的,以在图标上显示视图。将其放在第一页的左侧并拖动到 SpotLight,您会注意到文本淡出的方式有所不同。
Just as a note, Apple's Calendar app is actually hardcoded into the system to display a view over the icon. Put it on the left of the first page and drag to SpotLight, you will notice that the text fades out differently.
不幸的是,您无法使用 SDK(当然 Apple 不限于日历应用程序)——您可以制作徽章,但图像始终是静态的。
Unfortunately you can't use the SDK (which of course Apple isn't restricted to with the Calendar app) – you can do badges but the image is always static.
回答您的编辑:不,您不能更改捆绑包内的任何文件;您的应用程序被沙箱化,仅在其文档、缓存和临时目录中具有写访问权限。
In answer to your edit: no, you cannot alter any files inside your bundle; your application is sandboxed to only have write access within its documents, cache, and temporary directories.
在新的 iOS 10.3 更新(测试版)中这是可能的,但您必须在 info.plist 文件中指定每个图标。
alternateIconName
It's possible in new iOS 10.3 update(beta version) but you will have to specify each icon in the info.plist file.
alternateIconName