From 5140dcfb9a8d6170652412fb2d986fbddda59b79 Mon Sep 17 00:00:00 2001 From: ShawnBaek Date: Sun, 26 Jan 2020 20:39:48 +0900 Subject: [PATCH] Patch Examples --- Example/Slippery/CalendarVC.swift | 2 +- Example/Slippery/PhotoVC.swift | 2 +- Example/Slippery/SliceVC.swift | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Example/Slippery/CalendarVC.swift b/Example/Slippery/CalendarVC.swift index 442763e..1b53cc3 100644 --- a/Example/Slippery/CalendarVC.swift +++ b/Example/Slippery/CalendarVC.swift @@ -104,7 +104,7 @@ extension CalendarVC: UICollectionViewDelegate, UICollectionViewDataSource, UICo func setupCollectionView(){ - self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.calendarView, itemSize: CGSize(width: 120, height: 180), minimumLineSpacing: 10, highlightOption: .center(.normal)) + self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.calendarView, itemSize: CGSize(width: 120, height: self.calendarView.frame.height), minimumLineSpacing: 10, highlightOption: .center(.normal)) self.collectionViewLayout.invalidateLayout() self.calendarView.layoutIfNeeded() diff --git a/Example/Slippery/PhotoVC.swift b/Example/Slippery/PhotoVC.swift index f7bd915..aee542e 100644 --- a/Example/Slippery/PhotoVC.swift +++ b/Example/Slippery/PhotoVC.swift @@ -63,7 +63,7 @@ extension PhotoVC: UICollectionViewDelegate, UICollectionViewDataSource, UIColle func setupCollectionView(){ - self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.photoView, itemSize: CGSize(width: 150, height: 180), minimumLineSpacing: 20, highlightOption: .center(.normal)) + self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.photoView, itemSize: CGSize(width: 150, height: self.photoView.frame.height), minimumLineSpacing: 20, highlightOption: .center(.normal)) self.collectionViewLayout.minimumOpacityFactor = 0.1 self.collectionViewLayout.minimumScaleFactor = 1.0 diff --git a/Example/Slippery/SliceVC.swift b/Example/Slippery/SliceVC.swift index 183188b..f1bd9ef 100644 --- a/Example/Slippery/SliceVC.swift +++ b/Example/Slippery/SliceVC.swift @@ -50,7 +50,6 @@ class SliceVC: UIViewController { extension SliceVC: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { private var intialOffset: CGFloat { return self.collectionViewLayout.initialOffset - } @@ -62,9 +61,8 @@ extension SliceVC: UICollectionViewDelegate, UICollectionViewDataSource, UIColle } - func setupCollectionView(){ - - self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.sliceView, itemSize: CGSize(width: 30, height: 180), minimumLineSpacing: 20, highlightOption: .custom(.leading, .third)) + func setupCollectionView() { + self.collectionViewLayout = SlipperyFlowLayout.configureLayout(collectionView: self.sliceView, itemSize: CGSize(width: 30, height: self.sliceView.frame.height), minimumLineSpacing: 20, highlightOption: .custom(.leading, .third)) self.collectionViewLayout.invalidateLayout() self.sliceView.layoutIfNeeded()