嗨,我在将图像快速加载到屏幕时遇到问题。我第一次看到视图时似乎有延迟:
这是我加载图像的方式:
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。