NSRunLoop

NSInteger couter = 0;
while (self.aa == nil && couter < 10) {
     NSLog(@"aa为空,阻塞不去构造JSON字典");
     couter++;
   //每隔一秒检查一下aa是否为空,最多尝试10次. [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:
1]]; }

 

posted @ 2015-04-15 10:47  wb145230  阅读(97)  评论(0编辑  收藏  举报