From f9c177496e56207a262ae2d035fc15a1607d836f Mon Sep 17 00:00:00 2001 From: satishVekariya Date: Tue, 9 Jan 2018 14:11:24 +0530 Subject: [PATCH] Add pager view visibleCells property This method returns the complete list of visible cells displayed by the pager view. --- Sources/FSPagerView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index 6e3af53..6d2d866 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -196,6 +196,10 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega open var panGestureRecognizer: UIPanGestureRecognizer { return self.collectionView.panGestureRecognizer } + ///Returns an array of visible cells currently displayed by the pager view. + open var visibleCells: [FSPagerViewCell] { + return self.collectionView.visibleCells as! [FSPagerViewCell] + } @objc open internal(set) dynamic var currentIndex: Int = 0