UIGridView
Repoを使用 して、フィードから画像のグリッド ビューを作成しています。しかし、次のコードを使用すると、同じ画像がすべてのグリッドに表示されます。
-(UIGridViewCell *) gridView:(UIGridView *)grid cellForRowAt:(int)rowIndex AndColumnAt:(int)columnIndex
{
Cell *cell = (Cell *)[grid dequeueReusableCell];
if (cell == nil) {
cell = [[Cell alloc] init];
}
NSString *imageLink = [item objectForKey:@"link"];
NSURL * imageURL = [NSURL URLWithString:imageLink];
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage * image = [UIImage imageWithData:imageData];
cell.thumbnail.image = image;
return cell;
}
配列のすべての画像でグリッドを埋めるにはどうすればよいですか?
前もって感謝します