Latest 1.3.0
Homepage https://github.com/DominicMDev/DMSegmentedPager
License MIT
Platforms ios 10.0, requires ARC
Dependencies DMPagerView, DMParallaxHeader, DMSegmentedControl
Frameworks QuartzCore
Authors ,

Pod Version
Swift 4.2
Platform
Pod License

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

DMSegmentedPager combines DMPagerView with DMSegmentedControl to control the page selection. The integration of DMParallaxHeader allows you to add an parallax header on top while keeping a reliable scrolling effect.

Simple view Parallax view
Demo Demo

Highlight

  • DMSegmentedControl is a very customizable control.
  • DMParallaxHeader supports any kind of view with different modes.
  • DMPagerView lazily loads pages and supports reusable page registration.
  • Reliable vertical scroll with any view hierarchy.
  • Can load view-controller from storyboard using a custom segue.

Usage

  • Adding a parallax header to a DMSegmentedPager is straightforward, e.g:
let headerView = UIImageView(frame: imageFrame)
headerView.image = UIImage(named:"success-baby")
headerView.contentMode = .scaleAspectFill

let segmentedPager = DMSegmentedPager() 
segmentedPager.parallaxHeader.view = headerView
segmentedPager.parallaxHeader.height = 150
segmentedPager.parallaxHeader.mode = .fill
segmentedPager.parallaxHeader.minimumHeight = 20

Examples

If you want to try it, simply run:

pod try DMSegmentedPager

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

  • See DMSimpleViewController for a standard implementation.
  • See DMParallaxViewController to implement a pager with a parallax header.

Installation

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

pod 'DMSegmentedPager'

License

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

Latest podspec

{
    "name": "DMSegmentedPager",
    "version": "1.3.0",
    "summary": "A Swift conversion of https://github.com/maxep/MXSegmentedPager",
    "swift_version": "4.2",
    "homepage": "https://github.com/DominicMDev/DMSegmentedPager",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Dominic Miller": "[email protected]",
        "Maxime Epain": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DominicMDev/DMSegmentedPager.git",
        "tag": "1.3.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "source_files": "DMSegmentedPager/*.swift",
    "frameworks": "QuartzCore",
    "dependencies": {
        "DMPagerView": [
            "~> 1.2"
        ],
        "DMParallaxHeader": [
            "~> 2.1"
        ],
        "DMSegmentedControl": [
            "~> 1.2"
        ]
    }
}

Pin It on Pinterest

Share This