嗨我一直有问题快速加载图像到屏幕上。似乎有一个延迟,我第一次打的看法:iphone - image loading
这是我如何加载图片:
for (int i = 1; i < 19; i++)
{
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%@_Hole%d_", courseName, i]];
imageView = [[UIImageView alloc] initWithImage:image];
frame.origin.x = cx;
imageView.frame = frame;
[scrollView addSubview:imageView];
cx += scrollView.frame.size.width;
imageView = nil;
}
每个图像为640 x 820
为什么你不希望加载19个640x820的图像需要一点时间来点击你的视图?另外,我会关心所有这些图像的内存使用情况。你有没有想过仅仅在屏幕上需要延迟加载图像? – 2012-04-04 16:00:28