1
我知道如何安排localNotification并设置applicationIconBadgeNumber当localNotification推的applicationIconBadgeNumber:是可以计算当localNotification被称为
- (void) scheduleNotificationOn:(NSDate*) fireDate
text:(NSString*) alertText
action:(NSString*) alertAction
sound:(NSString*) soundfileName
launchImage:(NSString*) launchImage
andInfo:(NSDictionary*) userInfo
{
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = fireDate;
....
self.badgeCount ++;
localNotification.applicationIconBadgeNumber = self.badgeCount;
// Schedule it with the app
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
[localNotification release];
}
正如代码所示,applicationIconBadgeNumber是localNotification之前设置叫做。我想知道是否可以在调用localNotification时计算applicationIconBadgeNumber并将其显示在应用程序图标附近?