Код: Выделить всё
self.collectionView.performBatchUpdates({
var index = 0
var indexPaths = [NSIndexPath]()
for newObject in objects {
// Update datasource
self.datasource.insert(newObject, atIndex: index)
// Create index paths for new objects
let indexPath = NSIndexPath(forItem: index, inSection: 0)
indexPaths.append(indexPath)
// Update index
index += 1
}
self.collectionView.insertItemsAtIndexPaths(indexPaths)
}, completion: { (completed) in
})
public override func initialLayoutAttributesForAppearingItemAtIndexPath(itemIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? {
return nil
}
< /code>
Ничего из этого не работает. Анимация всегда случается. Ячейки, которые пользователь просматривает Flash /Animate /и т. Д. Когда новые данные вставлены и добавлены.>
Подробнее здесь: https://stackoverflow.com/questions/362 ... -animation
Мобильная версия