Latest 0.0.2
Homepage https://github.com/sketch204/PageLayout
License MIT
Platforms ios 9.0
Authors

This is a simple implementation of a Pager View, which uses Apple’s UICollectionView to handle recycling and all of the user interaction.

PageLayout
PageLayout
PageLayout

Installation

CocoaPods
Put pod 'PageLayout' into your Podfile and run pod install

Manual installation
You can always just take the PageLayout file and insert it into your project.


Using this View

To use this view simply create and insert an instance of a UICollectionView into your layout and inside the managing view controller, call self.collectionView.configurePageView() in the viewDidLoad method. This will cause the collectionView to update its layout manager object to a PageLayout instance making it a Page View.


Customization

The following is a list of properties that you can access and customize on the pageLayout property of the collection

  • orientation: NSLayoutConstraint.Axis = .horizontal
  • sidePadding: CGFloat! = nil // nil causes this to be 15% of the collection view's width/height
  • itemSpacing: CGFloat! = nil // nil causes this to be equal to sidePadding
  • itemsToFit: Int! = nil // nil causes this to be 1

Latest podspec

{
    "name": "PageLayout",
    "version": "0.0.2",
    "summary": "A simple paging view for iOS",
    "swift_version": "4.2",
    "description": "A paging view. Supports multiple items per page!",
    "homepage": "https://github.com/sketch204/PageLayout",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Inal Gotov": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/sketch204/PageLayout.git",
        "tag": "v0.0.2"
    },
    "source_files": "PageLayout/PageLayout.swift"
}

Pin It on Pinterest

Share This