Latest 0.1.0
Homepage https://github.com/xohozu/PagingFlowView
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Demo

Demo Out-of-Box PagingFlowLayout

Sample Code

override func viewDidLoad() {
    super.viewDidLoad()

    // begin to create cusmizable paging flow layout

    let pagingFlowLayout = PagingFlowLayout()

    pagingFlowLayout.pageRange = 145
    pagingFlowLayout.minimumSkippingPages = 1
    pagingFlowLayout.maximumSkippingPages = 1
    // pagingFlowLayout.pagingAlignOffset = CGPoint(x: -10, y: 0)
    // pagingFlowLayout.initiateCompensativeAnimationOnEndDraggingPage = true

    // that's done

    // below lines code is common configuration

    pagingFlowLayout.itemSize = CGSize(width: 140, height: 210)
    pagingFlowLayout.minimumLineSpacing = 5
    pagingFlowLayout.minimumInteritemSpacing = 5
    pagingFlowLayout.scrollDirection = .horizontal

    collectionView = UICollectionView(frame: CGRect(origin: .zero, size: CGSize(width: view.bounds.width, height: 210)), collectionViewLayout: pagingFlowLayout)

    collectionView.center = view.center
    collectionView.dataSource = self
    collectionView.delegate = self
    collectionView.contentInset = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)
    collectionView.register(InstagramUserRecommendationCell.self, forCellWithReuseIdentifier: "InstagramUserRecommendationCell")
    collectionView.backgroundColor = UIColor(red: 250.0 / 255, green: 250.0 / 255, blue: 250.0 / 255, alpha: 1.0)

    view.addSubview(collectionView)
    view.backgroundColor = .white

    automaticallyAdjustsScrollViewInsets = false
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

PagingFlowView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "PagingFlowView"

Author

xohozu, [email protected]

License

PagingFlowView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PagingFlowView",
    "version": "0.1.0",
    "summary": "A dedicated paging flow view backing by UICollectionView.",
    "description": "Including a dedicated paging flow layout providing customizable paging functionality that aims to substitute for `isPagingEnabled` of UICollectionView.",
    "homepage": "https://github.com/xohozu/PagingFlowView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "xohozu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/xohozu/PagingFlowView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PagingFlowView/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This