How Can I Animate the Size of A UICollectionViewCell on Scroll so the middle one is largest?
- 阅读更多 关于 How Can I Animate the Size of A UICollectionViewCell on Scroll so the middle one is largest?
问题 I have a UICollectionView that shows several rows with one, full-width column (looks like a UITableView) What I'd like to achieve is something similar to this: ... where the middle cell has a much greater height. As the user scrolls up and down, the cells before and after the middle cell animate back to the default height for the given cell. Can somebody outline how I should approach this problem? 回答1: I use this Swift 3 code in my horizontal UICollectionView . func scrollViewDidScroll(_