i am creating a simple walkthrough page and using collectionview for it. I want show to users a simple transition animation in the last cell.
I use the willdisplaycell method to do this but the animation is not happening.
Can you help with this?
override func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
let lastCell = collectionView.dequeueReusableCell(withReuseIdentifier: signcellid, for: indexPath) as! SignCell
if indexPath.row == pageImages.count {
UIView.animate(withDuration: 1, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.5, options: .curveEaseOut) {
lastCell.logoLabel.transform = CGAffineTransform(translationX: 200, y: 200)
}
}
}