程序中有一部分:
dispatch_sync (dispatch_get_main_queue (), ^ {
[startBtn setTitle: @ "Loading ..." forState: UIControlStateNormal];
[self loadImages]; / / loading images - AssesLibrary
});
[self makeCollage];
NSLog (@ "Albums found:% lu", (unsigned long) [assetGroups count]);
从块dispatch_sync程序出来,我需要先执行[self loadImages]
(填充数据数组)的功能,然后再执行[self makeCollage]
。如果没有dispatch_sync
- 那么只是[self makeCollage]
开始填充而不进一步处理数组并给出错误。
建议如何成为