Return to Snippet

Revision: 30937
at August 25, 2010 23:50 by iswear_wxp


Initial Code
UIApplication的一个属性,就查了下API,果然找到了这个属性:

@ property(nonatomic) NSInteger applicationIconBadgeNumber;  // set to 0 to hide. default is 0

 

    就结合手上正在做的项目,看看效果(在程序退出时,显示今日要处理的事件数目):

- (void)applicationDidEnterBackground:(UIApplication *)application{

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:

           _homeViewController._dayViewController.eventCountOfToday];

}

Initial URL
http://www.cnblogs.com/tracy-e/archive/2010/08/23/1806302.html

Initial Description

                                

Initial Title
在程序的ICON上显示数字

Initial Tags
iphone

Initial Language
iPhone