diff --git a/UPCarouselFlowLayoutDemo/ViewController.swift b/UPCarouselFlowLayoutDemo/ViewController.swift index e88bfaa..4ee2531 100644 --- a/UPCarouselFlowLayoutDemo/ViewController.swift +++ b/UPCarouselFlowLayoutDemo/ViewController.swift @@ -25,6 +25,9 @@ class ViewController: UIViewController, UICollectionViewDelegate, UICollectionVi } fileprivate var pageSize: CGSize { + + + let layout = self.collectionView.collectionViewLayout as! UPCarouselFlowLayout var pageSize = layout.itemSize if layout.scrollDirection == .horizontal {