@@ -21,7 +21,7 @@ public protocol FSPagerViewDataSource: NSObjectProtocol {
2121
2222 /// Asks your data source object for the cell that corresponds to the specified item in the pager view.
2323 @objc ( pagerView: cellForItemAtIndex: )
24- func pagerView( _ pagerView: FSPagerView , cellForItemAt index: Int ) -> FSPagerViewCell
24+ func pagerView( _ pagerView: FSPagerView , cellForItemAt index: Int ) -> FSPagerViewBaseCell
2525
2626}
2727
@@ -46,11 +46,11 @@ public protocol FSPagerViewDelegate: NSObjectProtocol {
4646
4747 /// Tells the delegate that the specified cell is about to be displayed in the pager view.
4848 @objc ( pagerView: willDisplayCell: forItemAtIndex: )
49- optional func pagerView( _ pagerView: FSPagerView , willDisplay cell: FSPagerViewCell , forItemAt index: Int )
49+ optional func pagerView( _ pagerView: FSPagerView , willDisplay cell: FSPagerViewBaseCell , forItemAt index: Int )
5050
5151 /// Tells the delegate that the specified cell was removed from the pager view.
5252 @objc ( pagerView: didEndDisplayingCell: forItemAtIndex: )
53- optional func pagerView( _ pagerView: FSPagerView , didEndDisplaying cell: FSPagerViewCell , forItemAt index: Int )
53+ optional func pagerView( _ pagerView: FSPagerView , didEndDisplaying cell: FSPagerViewBaseCell , forItemAt index: Int )
5454
5555 /// Tells the delegate when the pager view is about to start scrolling the content.
5656 @objc ( pagerViewWillBeginDragging: )
@@ -379,15 +379,15 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
379379 return
380380 }
381381 let index = indexPath. item % self . numberOfItems
382- function ( self , cell as! FSPagerViewCell , index)
382+ function ( self , cell as! FSPagerViewBaseCell , index)
383383 }
384384
385385 public func collectionView( _ collectionView: UICollectionView , didEndDisplaying cell: UICollectionViewCell , forItemAt indexPath: IndexPath ) {
386386 guard let function = self . delegate? . pagerView ( _: didEndDisplaying: forItemAt: ) else {
387387 return
388388 }
389389 let index = indexPath. item % self . numberOfItems
390- function ( self , cell as! FSPagerViewCell , index)
390+ function ( self , cell as! FSPagerViewBaseCell , index)
391391 }
392392
393393 public func scrollViewDidScroll( _ scrollView: UIScrollView ) {
@@ -451,7 +451,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
451451 /// Register a nib file for use in creating new pager view cells.
452452 ///
453453 /// - Parameters:
454- /// - nib: The nib object containing the cell object. The nib file must contain only one top-level object and that object must be of the type FSPagerViewCell .
454+ /// - nib: The nib object containing the cell object. The nib file must contain only one top-level object and that object must be of the type FSPagerViewBaseCell .
455455 /// - identifier: The reuse identifier to associate with the specified nib file. This parameter must not be nil and must not be an empty string.
456456 @objc ( registerNib: forCellWithReuseIdentifier: )
457457 open func register( _ nib: UINib ? , forCellWithReuseIdentifier identifier: String ) {
@@ -463,15 +463,15 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
463463 /// - Parameters:
464464 /// - identifier: The reuse identifier for the specified cell. This parameter must not be nil.
465465 /// - index: The index specifying the location of the cell.
466- /// - Returns: A valid FSPagerViewCell object.
466+ /// - Returns: A valid FSPagerViewBaseCell object.
467467 @objc ( dequeueReusableCellWithReuseIdentifier: atIndex: )
468- open func dequeueReusableCell( withReuseIdentifier identifier: String , at index: Int ) -> FSPagerViewCell {
468+ open func dequeueReusableCell( withReuseIdentifier identifier: String , at index: Int ) -> FSPagerViewBaseCell {
469469 let indexPath = IndexPath ( item: index, section: self . dequeingSection)
470470 let cell = self . collectionView. dequeueReusableCell ( withReuseIdentifier: identifier, for: indexPath)
471- guard cell. isKind ( of: FSPagerViewCell . self) else {
472- fatalError ( " Cell class must be subclass of FSPagerViewCell " )
471+ guard cell. isKind ( of: FSPagerViewBaseCell . self) else {
472+ fatalError ( " Cell class must be subclass of FSPagerViewBaseCell " )
473473 }
474- return cell as! FSPagerViewCell
474+ return cell as! FSPagerViewBaseCell
475475 }
476476
477477 /// Reloads all of the data for the collection view.
@@ -532,7 +532,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
532532 /// - Parameter cell: The cell object whose index you want.
533533 /// - Returns: The index of the cell or NSNotFound if the specified cell is not in the pager view.
534534 @objc ( indexForCell: )
535- open func index( for cell: FSPagerViewCell ) -> Int {
535+ open func index( for cell: FSPagerViewBaseCell ) -> Int {
536536 guard let indexPath = self . collectionView. indexPath ( for: cell) else {
537537 return NSNotFound
538538 }
@@ -544,9 +544,9 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
544544 /// - Parameter index: The index that specifies the position of the cell.
545545 /// - Returns: The cell object at the corresponding position or nil if the cell is not visible or index is out of range.
546546 @objc ( cellForItemAtIndex: )
547- open func cellForItem( at index: Int ) -> FSPagerViewCell ? {
547+ open func cellForItem( at index: Int ) -> FSPagerViewBaseCell ? {
548548 let indexPath = self . nearbyIndexPath ( for: index)
549- return self . collectionView. cellForItem ( at: indexPath) as? FSPagerViewCell
549+ return self . collectionView. cellForItem ( at: indexPath) as? FSPagerViewBaseCell
550550 }
551551
552552 // MARK: - Private functions
0 commit comments