/ Published in: iPhone
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
UIApplication的一个属性,就查了下API,果然找到了这个属性: @ property(nonatomic) NSInteger applicationIconBadgeNumber; // set to 0 to hide. default is 0 就结åˆæ‰‹ä¸Šæ£åœ¨åšçš„项目,看看效果(在程åºé€€å‡ºæ—¶ï¼Œæ˜¾ç¤ºä»Šæ—¥è¦å¤„ç†çš„事件数目): - (void)applicationDidEnterBackground:(UIApplication *)application{ [[UIApplication sharedApplication] setApplicationIconBadgeNumber: _homeViewController._dayViewController.eventCountOfToday]; }
URL: http://www.cnblogs.com/tracy-e/archive/2010/08/23/1806302.html