如何在循环中打印?循环中的objective-c打印
我有谁调用一个方法
for (NSDictionary *item in allItems) {
[self printa:item];
};
在该方法中的阵列我的NSLog并打印dooring环路,但等待循环结束前的打印每元素,每隔图像。
我尝试了块,但由于某些原因不起作用。
我在寻找asyncronous,我该怎么办?
编辑 - 添加更多的代码:
这是printa代码:
启动方式:
bubble = [NSBubbleData dataWithText:testo date:[NSDate dateWithTimeIntervalSinceNow:0] type:BubbleTypeSomeoneElse];
bubble.avatar = [UIImage imageWithData:imgData];
[bubbleData addObject:bubble];
[bubbleTable reloadData];
NSIndexPath *path = [NSIndexPath indexPathForRow:bubbleData.count inSection:0];
[bubbleTable scrollToRowAtIndexPath:path atScrollPosition:UITableViewScrollPositionBottom animated:YES];
仪testo和imgData数据:
-(void)printa:(NSDictionary*)item
部分代码来自服务器,并在NSDictionary里面
NSString *testo=[item objectForKey:@"messaggio"];
在此先感谢
我不明白... – CW0007007
循环被锁定,直到结束 –
在printa中会发生什么? – CW0007007