Infinite paging, Smart auto layout, Interface of similar to UIKit.
Infinite paging, Smart auto layout, Interface of similar to UIKit.
Add the following to your Podfile
:
pod "PagingView"
Add the following to your Cartfile
:
github "KyoheiG3/PagingView"
weak var dataSource: PagingViewDataSource?
PagingView
. Same as dataSource
of UICollectionView
.var pagingMargin: UInt
0
.var pagingInset: UInt
PagingView
.pagingInset
to set for the left and right of contentInset
.0
.var infinite: Bool
true
.func dequeueReusableCellWithReuseIdentifier(identifier: String) -> PagingView.PagingViewCell
delegate
to acquire an already allocated cell, in lieu of allocating a new one.func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
PagingViewCell
.func registerClass<T : PagingView.PagingViewCell>(viewClass: T.Type, forCellWithReuseIdentifier identifier: String)
init(frame: CGRect)
.func reloadData()
dataSource
and delegate
as necessary.func invalidateLayout()
func numberOfSections() -> Int
func numberOfItemsInSection(section: Int) -> Int
PagingView
.func scrollToPosition(position: PagingView.PagingView.Position, indexPath: IndexPath? = default, animated: Bool = default)
Position
.IndexPath
.func configureAtPosition(position: PagingView.PagingView.Position, toIndexPath: IndexPath? = default)
Position
.nil
.func pagingView(pagingView: PagingView.PagingView, numberOfItemsInSection section: Int) -> Int
func pagingView(pagingView: PagingView.PagingView, cellForItemAtIndexPath indexPath: IndexPath) -> PagingView.PagingViewCell
dequeueReusableCellWithReuseIdentifier:
.optional func numberOfSectionsInPagingView(pagingView: PagingView.PagingView) -> Int
PagingView
.1
.optional func indexPathOfStartingInPagingView(pagingView: PagingView.PagingView) -> IndexPath?
pagingView:cellForItemAtIndexPath:
is first called0 - 0
of IndexPath
instance.optional func pagingView(pagingView: PagingView.PagingView, willDisplayCell cell: PagingView.PagingViewCell, forItemAtIndexPath indexPath: IndexPath)
optional func pagingView(pagingView: PagingView.PagingView, didEndDisplayingCell cell: PagingView.PagingViewCell, forItemAtIndexPath indexPath: IndexPath)
func prepareForReuse()
dequeueReusableCellWithReuseIdentifier:
.Under the MIT license. See LICENSE file for details.