Dynamic iPhone App icons?

ぐ巨炮叔叔 提交于 2019-11-28 04:58:34

问题


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?


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


It's possible in new iOS 10.3 update(beta version) but you will have to specify each icon in the info.plist file.

func setAlternateIconName(_ alternateIconName: String?, 
    completionHandler: ((Error?) -> Void)? = nil)

alternateIconName



来源:https://stackoverflow.com/questions/2421830/dynamic-iphone-app-icons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!