私のアプリは、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:]メソッドで画像が完了するのを待つ、画像のダウンロードを表示する、または自動的に再読み込みするにはどうすればよいですか?