为什么这里还要用iOS8的宏包裹,不是用if判断了吗。如果true则是上面(iOS8)的方式请求,否则就是下面(iOS7)的请求,那为什么还要把上面用iOS8宏包起来,不是有点多余吗?
2020-03-25
取消notif(2)
UIApplication *app = [UIApplication sharedApplication];
app.applicationIconBadgeNumber = 0;
[app cancelAllLocalNotifications];
UIApplication *app = [UIApplication sharedApplication];
app.applicationIconBadgeNumber = 0;
[app cancelAllLocalNotifications];
2017-12-04
取消notif
NSArray<UILocalNotification *> *localNotifications = [UIApplication sharedApplication].scheduledLocalNotifications;
UILocalNotification * notif = localNotifications[0];//这里选择notif对象
[[UIApplication sharedApplication]]cancelLocatNotification:notif];
NSArray<UILocalNotification *> *localNotifications = [UIApplication sharedApplication].scheduledLocalNotifications;
UILocalNotification * notif = localNotifications[0];//这里选择notif对象
[[UIApplication sharedApplication]]cancelLocatNotification:notif];
2017-12-04