DMPagerView 1.2.0

DMPagerView 1.2.0

Maintained by Dominic Miller.



  • By
  • Dominic Miller and Maxime Epain

DMPagerView

Pod Version Swift 4.2 Platform Pod License

This is a Swift conversion of https://github.com/maxep/MXPagerView

DMPagerView is a pager view with the ability to reuse pages like you would do with a table view and cells. Depending on the transition style, it will load the current page and neighbors and unload others pages.

DMPagerViewController allows you to load pages from storyboard using the DMPageSegue.

Usage

If you want to try it, simply run:

pod try DMPagerView

Or clone the repo and run pod install from the Example directory first.

  • As a UITableView, the MXPagerView calls data source methods to load pages.
  • In order to reuse pages, first register the reusable view.
  • Then, dequeue a reusable page in the data source.

The DMPagerView comes with a UIView category which exposed the reuse identifier of the page as well as the prepareForReuse method, this is called just before the page is returned from the pager view method dequeueReusablePage(withIdentifier:).

  • Using MXPagerViewController in storyboard is super easy:

Installation

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

pod 'DMPagerView'

License

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