我使用泛洪代码预加载我的图像:
NSMutableArray *test_loose_preload = [[NSMutableArray alloc] initWithCapacity:test_loose_array.count];
for (int aniCount = 0; aniCount < test_loose_array.count; aniCount++) {
UIImage *frameImage = [test_loose_array objectAtIndex:aniCount];
UIGraphicsBeginImageContext(frameImage.size);
CGRect rect = CGRectMake(0, 0, frameImage.size.width, frameImage.size.height);
[frameImage drawInRect:rect];
UIImage *renderedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[test_loose_preload addObject:renderedImage];
}
test_loose = test_loose_preload;
是否有可能在此块中检查图像是否已经预加载并且不再需要预加载该图像?
感谢您的想法!