Remove an redundant property.
This commit is contained in:
parent
c72899860d
commit
d3544d8076
|
|
@ -24,7 +24,6 @@ class FSPagerViewLayout: UICollectionViewLayout {
|
|||
return self.collectionView?.superview?.superview as? FSPagerView
|
||||
}
|
||||
|
||||
fileprivate var isInfinite: Bool = true
|
||||
fileprivate var collectionViewSize: CGSize = .zero
|
||||
fileprivate var numberOfSections = 1
|
||||
fileprivate var numberOfItems = 0
|
||||
|
|
@ -267,7 +266,7 @@ class FSPagerViewLayout: UICollectionViewLayout {
|
|||
return
|
||||
}
|
||||
let currentIndex = max(0, min(pagerView.currentIndex, pagerView.numberOfItems - 1))
|
||||
let newIndexPath = IndexPath(item: currentIndex, section: self.isInfinite ? self.numberOfSections/2 : 0)
|
||||
let newIndexPath = IndexPath(item: currentIndex, section: pagerView.isInfinite ? self.numberOfSections/2 : 0)
|
||||
let contentOffset = self.contentOffset(for: newIndexPath)
|
||||
let newBounds = CGRect(origin: contentOffset, size: collectionView.frame.size)
|
||||
collectionView.bounds = newBounds
|
||||
|
|
|
|||
Loading…
Reference in New Issue