可以通过官方SDK的UIApplication类的如下属性设置:
@property(nonatomic) NSInteger applicationIconBadgeNumber;
私有API中有更强大的功能,可以设置边角字符串,即不限于是数字:
- (void)setApplicationBadgeString:(NSString *)str;
可以通过官方SDK的UIApplication类的如下属性设置:
@property(nonatomic) NSInteger applicationIconBadgeNumber;
私有API中有更强大的功能,可以设置边角字符串,即不限于是数字:
- (void)setApplicationBadgeString:(NSString *)str;