【发布时间】:2012-04-20 01:00:10
【问题描述】:
我的应用程序在启动时会显示照片提要,就像 Instagram 一样。 我的问题是应用程序在完全下载之前显示空图像(用于单元格)属性。
当我向下滚动视图并再次向上滚动(使某些单元格不可见,然后通过滚动使其可见)时,单元格图像就会显示出来!
设置单元格的方法是这样的..
- (AQGridViewCell *)gridView: (AQGridView *)aGridView cellForItemAtIndex: (NSUInteger)index {
static NSString *PlainCellIdentifier = @"PlainCellIdentifier";
GridViewCell *cell = (GridViewCell *)[aGridView dequeueReusableCellWithIdentifier:@"PlainCellIdentifier"];
if ( cell == nil ) {
cell = [[GridViewCell alloc] initWithFrame: CGRectMake(0, 0, 74, 74)
reuseIdentifier: PlainCellIdentifier];
}
[cell.captionLabel setText:text];
[cell.imageView setImage:image];
return cell;
}
[setImage:] 方法等待图片完成,或显示正在下载的图片,或自动重新加载,我该怎么办?
【问题讨论】:
标签: iphone xcode download uiimage reload