The 'removesInfiniteLoopForSingleItem' property should be removed from 'readonly' section.

This commit is contained in:
WenchaoD 2018-09-14 15:17:30 +08:00
parent 7fab78be1b
commit 61086f0806
1 changed files with 5 additions and 9 deletions

View File

@ -156,8 +156,12 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
return self.collectionView.alwaysBounceVertical
}
}
/// A Boolean value that controls whether the infinite loop is removed if there is only one item. Default is false.
@IBInspectable
open var removesInfiniteLoopForSingleItem: Bool = false {
didSet {
self.collectionView.alwaysBounceVertical = self.alwaysBounceVertical;
self.reloadData()
}
}
@ -191,14 +195,6 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
return self.collectionView.isTracking
}
/// Remove the infinite loop if there is only one item. default is NO
@IBInspectable
open var removesInfiniteLoopForSingleItem: Bool = false {
didSet {
self.reloadData()
}
}
/// The percentage of x position at which the origin of the content view is offset from the origin of the pagerView view.
open var scrollOffset: CGFloat {
let contentOffset = max(self.collectionView.contentOffset.x, self.collectionView.contentOffset.y)