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