Вопрос

    .
  • в исходном состоянии, моя коллекция имеет три ячейки, в одном разделе: cell1, cell2 и cell3.

  • в следующем состоянии, первая клетка меняется и становится генеракодицетагкодом.Он имеет тот же размер.

Можно ли оживить это изменение cell1_bis?

Это было полезно?

Решение

Ответ

Продолжить этот путь:

 [self.collectionView

 performBatchUpdates:^
 {
     NSIndexPath * whereTheChangeIs = [NSIndexPath indexPathForItem:row
                                                          inSection:section] ;

     [self.collectionView deleteItemsAtIndexPaths:@[whereTheChangeIs]] ;
     [self.collectionView insertItemsAtIndexPaths:@[whereTheChangeIs]] ;
 }

 completion:^(BOOL finished)
 {
     // nothing
 }] ;
.

Вопрос

К сожалению, следующее не работает.Ошибка?

 [self.collectionView

 performBatchUpdates:^
 {
     NSIndexPath * whereTheChangeIs = [NSIndexPath indexPathForItem:row
                                                          inSection:section] ;

     [self.collectionView reloadItemsAtIndexPaths:@[whereTheChangeIs]] ;
 }

 completion:^(BOOL finished)
 {
     // nothing
 }] ;
.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top