如何选择CPU和网络压力都比较小的时间发送数据包?

来源:互联网 发布:windows 光盘镜像 编辑:程序博客网 时间:2024/05/29 03:02

http://www.cocoachina.com/bbs/read.php?tid=117240


[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notificationMethod) name:@"my_notification" object:nil];

NSNotification *notification = [NSNotificatioin notificationWithName:@"my_notification" object:nil];

[[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostWhenIdle];

在app空闲的时候,发出自定义消息my_notification, 执行自定义方法notificationMethod 

原创粉丝点击