它运行良好,但不会停止。
[group enumerateAssetsAtIndexes:set options:NSEnumerationReverse usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop)
{
CGImageRef imageRef = result.defaultRepresentation.fullResolutionImage;
UIImage *toSend=[UIImage imageWithCGImage:imageRef];
NSLog(@"INDEXX:%d",index); //logged after i stop !
for(int c=0;c<[selectedButtonsTags count];c++)
if((numberOfAssets-1)-index ==[[selectedButtonsTags objectAtIndex:c] integerValue])
{[savedImages addObject:toSend]; NSLog(@"IMAGE IS:%@ index:%d",toSend,index); }
if(index==numberOfAssets-max-1 )
{ NSLog(@"OUT!"); //it DO log this !
*stop=YES;
}
}];
记录后OUT
,它再次记录index:
垃圾号`