Change icon on of an App in iOS 4 in run-time

后端 未结 2 984
梦如初夏
梦如初夏 2021-01-19 07:17

How can I change the icon of my App in iOS 4 at run-time the way the icon of the Calendar app changes based on the date today?

I want to publish a 4 digit number nu

相关标签:
2条回答
  • 2021-01-19 07:58

    The best you can do right now within the bounds of Apple-sanctioned APIs is to add a red badge with a number to the icon using the UIApplication applicationIconBadgeNumber property. Not sure if it's big enough to fit 4 digits though.

    That's if you want to set it while the app is open. To update the badge in the background, you will need to either post a UILocalNotification (if you know ahead of time when and what the badge should say), or use push notifications.

    0 讨论(0)
  • 2021-01-19 08:01

    There is no way to do this using the iOS SDK (you can badge your icon, but you can't modify the icon itself.) If you would like to see this feature added to iOS, file an enhancement request at http://bugreporter.apple.com.

    0 讨论(0)
提交回复
热议问题