PageLayout

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

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