From 1456109b5ab6118f5a676550e6d24e51c78063bc Mon Sep 17 00:00:00 2001 From: Alex Tang Date: Sun, 31 Mar 2019 23:10:03 -0700 Subject: [PATCH 1/2] Added ability to set clipsToBounds --- Sources/FSPagerView.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index 7fb17d9..3917c87 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -191,6 +191,13 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega self.collectionViewLayout.forceInvalidate() } } + + /// Whether or not the pager clipsToBounds/masksToBounds. Set to false if you want the cells to be able to bleed outside the collection view. + open var collectionViewClipsToBounds: Bool = true { + didSet { + self.collectionView.clipsToBounds = self.collectionViewClipsToBounds + } + } // MARK: - Public readonly-properties From 9b07eb5e25512a2e6ea0644fec401f9f08d41107 Mon Sep 17 00:00:00 2001 From: Alex Tang Date: Sun, 31 Mar 2019 23:31:44 -0700 Subject: [PATCH 2/2] add default to comment --- Sources/FSPagerView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index 3917c87..5ae5374 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -192,7 +192,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega } } - /// Whether or not the pager clipsToBounds/masksToBounds. Set to false if you want the cells to be able to bleed outside the collection view. + /// Whether or not the pager clipsToBounds/masksToBounds. Set to false if you want the cells to be able to bleed outside the collection view. The default is true. open var collectionViewClipsToBounds: Bool = true { didSet { self.collectionView.clipsToBounds = self.collectionViewClipsToBounds