【发布时间】:2010-10-22 08:28:30
【问题描述】:
void (^assetEnumerator)(struct ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) {
如何停止assetEnumerator 运行循环?
谢谢。
【问题讨论】:
void (^assetEnumerator)(struct ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) {
如何停止assetEnumerator 运行循环?
谢谢。
【问题讨论】:
文档说的差不多:
在块中做:
*stop = YES;
然后在您当前的“迭代”之后,它将停止枚举资产。
【讨论】: