の状態を保存する方法を教えてくださいUICollectionViewCell。例: 私は間違ったセルを返したUIWebViewときにセルを持っています。ありがとう!dequeueReusableCellWithReuseIdentifier:forIndexPath:indexPathUIWebViewindexPath
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
NewsCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"NEWS_CELL" forIndexPath:indexPath];
if (!cell.isShowed) { // I just added boolean property
cell.isShowed = YES;
/*** some init actions ***/
}
return cell;
}
この方法を使用すると、セルがcell.isShowed == YES間違って返されますindexPath。cell.isShowedしかし、UIWebView のコンテンツを使用しないと、すべての表示セルでリロードされます。英語で申し訳ありません:)