為什么這里還要用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