Animate a collectionview swift

Viewed 3893

Hello I am trying to animate a CollectionView. It need to change the position x and his width.

UIView.animate(withDuration: 1, delay: 0, options: .beginFromCurrentState, animations: {
    collectionView.frame = CGRect(x: 500, y: 0, width: 1000, height: 700)
})

But the problem is the image in the cell doesn't resize, and i think the cell too. Have you a solution for that ?

3 Answers
Related