我有这个代码,我想要做的就是保持自己活跃在块中,它将在主线程上执行。结果是一种随机的,有时打印空。 - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.proArray = [[NSMutableArray alloc]in
我有一种在内部调用API的方法。该方法没有任何完成处理程序。 -(void) methodToBeTested{
[self callAPIWithCompletionHandler:^(NSArray *data,NSError *error)
{
//Here I get the response and sets the models.
}];
}