Reduce the line count cost of 'alwaysBounceVertical' and 'alwaysBounceHorizontal' property of FSPagerView.

This commit is contained in:
WenchaoD 2018-09-24 13:01:54 +08:00
parent 985890d382
commit 45f1a6c11b
1 changed files with 4 additions and 12 deletions

View File

@ -155,23 +155,15 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
/// A Boolean value that determines whether bouncing always occurs when horizontal scrolling reaches the end of the content view.
@IBInspectable
open var alwaysBounceHorizontal: Bool {
set {
self.collectionView.alwaysBounceHorizontal = newValue
}
get {
return self.collectionView.alwaysBounceHorizontal
}
set { self.collectionView.alwaysBounceHorizontal = newValue }
get { return self.collectionView.alwaysBounceHorizontal }
}
/// A Boolean value that determines whether bouncing always occurs when vertical scrolling reaches the end of the content view.
@IBInspectable
open var alwaysBounceVertical: Bool {
set {
self.collectionView.alwaysBounceVertical = newValue
}
get {
return self.collectionView.alwaysBounceVertical
}
set { self.collectionView.alwaysBounceVertical = newValue }
get { return self.collectionView.alwaysBounceVertical }
}
/// A Boolean value that controls whether the infinite loop is removed if there is only one item. Default is false.