【发布时间】:2014-12-11 08:31:20
【问题描述】:
我一直在处理本地通知。但问题是应用程序图标徽章编号不会随着本地通知的增加而增加。我试过 .applicationIconBadgeNumber+1; 但它没有任何效果。应用程序图标徽章编号始终为 1。
enter code here
- (IBAction)save:(id)sender
{
eventitem=textfield.text;
NSDate *newdate=self.datepick.date;
UIApplication *app=[UIApplication sharedApplication];
notifyalarm=[[UILocalNotification alloc]init];
if (notifyalarm)
{
notifyalarm.fireDate=newdate;
notifyalarm.timeZone=[NSTimeZone defaultTimeZone];
notifyalarm.alertBody=eventitem;
notifyalarm.applicationIconBadgeNumber=[UIApplication sharedApplication] .applicationIconBadgeNumber+1;
[app scheduleLocalNotification:notifyalarm];
}
}
【问题讨论】:
标签: ios uilocalnotification badge