Как повторно использовать ячейку с didEndDisplay? - PullRequest
0 голосов
/ 07 ноября 2019

dequeueReusableCellWithReuseIdentifier не вызывать. Я хочу использовать did / willDisplayinfCell

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    GalleryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
    [self operationDowloadManagerDataURL:[self.imageArray objectAtIndex:indexPath.item] compeition:^(UIImage *image) {
        dispatch_async(dispatch_get_main_queue(), ^{
            cell.imageView.image = image;
        });
    }];
    return cell;
}


- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {

    [self.collectionView reloadItemsAtIndexPaths:@[indexPath]];

}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...