     }
 }
 
-extension UIView {
+public extension UIView {
     func setAnchorPoint(_ anchorPoint: CGPoint) {
         
         var newPoint = CGPoint(x: bounds.size.width * anchorPoint.x, y: bounds.size.height * anchorPoint.y)


import UIKit

class CubicCollectionViewController: UIViewController {

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

    override func viewDidLoad() {
        super.viewDidLoad()
        configureLayout()
    }

        return CGFloat(collectionView.contentOffset.x / collectionView.frame.width)
    }
    
    open func scrollViewDidScroll(_ scrollView: UIScrollView) {
        for indexPath in collectionView.indexPathsForVisibleItems  {
            let cell = collectionView.cellForItem(at: indexPath)!
            let angle = angleForCell(at: indexPath)
