• Stars
    star
    316
  • Rank 132,587 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Infinite paging, Smart auto layout, Interface of similar to UIKit.

LOGO

Carthage compatible Version License Platform

Infinite paging, Smart auto layout, Interface of similar to UIKit.

Appetize's Demo

Demo

Requirements

  • Swift 4.2
  • iOS 8.0 or later

How to Install PagingView

Cocoapods

Add the following to your Podfile:

pod "PagingView"

Carthage

Add the following to your Cartfile:

github "KyoheiG3/PagingView"

Usage

PagingView Variable

weak var dataSource: PagingViewDataSource?
  • DataSource of PagingView. Same as dataSource of UICollectionView.
var pagingMargin: UInt
  • Margin between the content.
  • Default is 0.
var pagingInset: UInt
  • Inset of content relative to size of PagingView.
  • Value of two times than of pagingInset to set for the left and right of contentInset.
  • Default is 0.
var infinite: Bool
  • Infinite looping enabled flag.
  • Default is true.

PagingView Function

func dequeueReusableCellWithReuseIdentifier(identifier: String) -> PagingView.PagingViewCell
  • Used by the delegate to acquire an already allocated cell, in lieu of allocating a new one.
func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
  • If a nib is registered, it must contain exactly 1 top level object which is a PagingViewCell.
func registerClass<T : PagingView.PagingViewCell>(viewClass: T.Type, forCellWithReuseIdentifier identifier: String)
  • If a class is registered, it will be instantiated via init(frame: CGRect).
func reloadData()
  • Requery the dataSource and delegate as necessary.
func invalidateLayout()
  • Relayout as necessary.
func numberOfSections() -> Int
func numberOfItemsInSection(section: Int) -> Int
  • Information about the current state of the PagingView.
func scrollToPosition(position: PagingView.PagingView.Position, indexPath: IndexPath? = default, animated: Bool = default)
  • To scroll at Position.
  • Cell configure is performed at IndexPath.
func configureAtPosition(position: PagingView.PagingView.Position, toIndexPath: IndexPath? = default)
  • Configure cell of Position.
  • IndexPath of cell in the center if indexPath is nil.

PagingViewDataSource Function

func pagingView(pagingView: PagingView.PagingView, numberOfItemsInSection section: Int) -> Int
  • Paging count number of paging item in section.
func pagingView(pagingView: PagingView.PagingView, cellForItemAtIndexPath indexPath: IndexPath) -> PagingView.PagingViewCell
  • Implementers should always try to reuse cells by setting each cell's reuseIdentifier and querying for available reusable cells with dequeueReusableCellWithReuseIdentifier:.
optional func numberOfSectionsInPagingView(pagingView: PagingView.PagingView) -> Int
  • Paging count number of paging item section in PagingView.
  • Default return value is 1.
optional func indexPathOfStartingInPagingView(pagingView: PagingView.PagingView) -> IndexPath?
  • IndexPath when pagingView:cellForItemAtIndexPath: is first called
  • Default return value is 0 - 0 of IndexPath instance.

PagingViewDelegate Function

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)
  • Called at the display and end-display of.

PagingViewCell Function

func prepareForReuse()
  • if the cell is reusable (has a reuse identifier), this is called just before the cell is returned from the paging view method dequeueReusableCellWithReuseIdentifier:.

LICENSE

Under the MIT license. See LICENSE file for details.

More Repositories

1

DynamicBlurView

DynamicBlurView is a dynamic and high performance UIView subclass for Blur.
Swift
967
star
2

GridView

Reusable GridView with excellent performance and customization that can be time table, spreadsheet, paging and more.
Swift
855
star
3

TableViewDragger

A cells of UITableView can be rearranged by drag and drop.
Swift
536
star
4

AttributedLabel

Easy to use, fast, and higher performance than UILabel.
Swift
524
star
5

SimpleAlert

Customizable simple Alert and simple ActionSheet for Swift
Swift
398
star
6

SpringIndicator

SpringIndicator is indicator and PullToRefresh. Inspired by Material design components.
Swift
272
star
7

Keynode

Interactive Keyboard Controller for Swift
Swift
77
star
8

NavigationNotice

Customizable and interactive animated notification UI control.
Swift
75
star
9

ProtobufExample

Example of requesting Protocol Buffers and JSON with Swift. API is Swift or Go.
Swift
67
star
10

Plan

The Plan.framework helps to keep your iOS application design clean.
Swift
36
star
11

RxDisplayLink

RxDisplayLink reactive wrapper for CADisplayLink
Swift
29
star
12

smooth_counter

Dart
24
star
13

Exclusion

Customizable URLCache.
Swift
19
star
14

MountainView

The animation curve looks like Mountain View.
Swift
14
star
15

G3JSON

Objective-C
11
star
16

gRPCExample

Swift
11
star
17

XcodeGenSample

Swift
9
star
18

InfiniteView

Swift
4
star
19

lcov_excluder

It is possible to exclude coverage by editing the contents of the lcov.info file.
Dart
3
star
20

grain

Module management library like requirejs.
JavaScript
2
star
21

CollectionViewGridLayout

How to use grid layout in UICollectionView.
Swift
2
star
22

assets

1
star