Hello Devs, I am trying to make a UICollectionview cell expand when taped however I can't find a solution for this. I have been able to expand the cells using:
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
if expandedRow == indexPath {
return CGSize(width: UIScreen.main.bounds.width - 20, height: 150)
} else {
return CGSize(width: UIScreen.main.bounds.width - 20, height: 65)
}
}
but it's not a smooth animation it just jumps to the expanded size what I need is a smooth animation from collapsed size to expanded size when taped, thanks in advance.