From 45f1a6c11b1e58a6849efabcbd238fce63ef5c4d Mon Sep 17 00:00:00 2001 From: WenchaoD Date: Mon, 24 Sep 2018 13:01:54 +0800 Subject: [PATCH] Reduce the line count cost of 'alwaysBounceVertical' and 'alwaysBounceHorizontal' property of FSPagerView. --- Sources/FSPagerView.swift | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index e128775..5e02d68 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -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.