UILocalNotification *_localNotification=[[UILocalNotificationalloc] init];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{
while (TRUE) {
[NSThreadsleepForTimeInterval:10];
[[UIApplicationsharedApplication] cancelAllLocalNotifications];
//网络请求
//其他处理
[[UIApplicationsharedApplication] scheduleLocalNotification:_localNotification];
};
}); |
|