 }
 
 
-extension ViewController: UICollectionViewDataSource {
+extension CubicCollectionViewController: UICollectionViewDataSource {
     final func numberOfSections(in collectionView: UICollectionView) -> Int {
         return 1
     }


import UIKit

class ViewController: UIViewController {

    let maxAngle: CGFloat = 60
    @IBOutlet weak var collectionView: UICollectionView!

    }
}

extension CubicCollectionViewController: UIScrollViewDelegate {
    private func angleForCell(at indexPath: IndexPath) -> CGFloat {
        let p = transitionProgressForCell(at: indexPath)
        return maxAngle * p
