Skip to content

Commit

Permalink
Reduce the line count cost of 'alwaysBounceVertical' and 'alwaysBounc…
Browse files Browse the repository at this point in the history
…eHorizontal' property of FSPagerView.
  • Loading branch information
WenchaoD committed Sep 24, 2018
1 parent 985890d commit 45f1a6c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Sources/FSPagerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 45f1a6c

Please sign in to comment.