Latest 0.1.0
Homepage https://github.com/OiNutter/Flipbook
License MIT
Platforms ios 11.4
Authors

CI Status
Version
License
Platform

Example

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

Requirements

Installation

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

pod 'Flipbook'

Usage


override func viewDidLoad() {
    super.viewDidLoad()

    var images:[String] = [String]()
    for i in 1...5 {
        images.append("image(i)")
    }

    let flipbook:Flipbook = Flipbook(withImages: images)

    addChild(flipbook)
    view.addSubview(flipbook.view)
    flipbook.view.expandToParent(view)
    flipbook.didMove(toParent: self)
}

Images can be an array of UIImages, Strings or URLs.

Configuration

The following options are customisable and should be set before you add the
view.

  • contentMode:UIView.ContentMode: The content mode of the UIImageView used
    to display an image. Defaults to .scaleAspectFill
  • transitionStyle:UIPageViewController.TransitionStyle: The transition style
    used when paging through images. Defaults to .scroll
  • direction:UIPageViewController.NavigationDirection: The navigation direction
    of the page controller. Defaults to .forward
  • orientation:UIPageViewController.NavigationOrientation: The navigation
    orientation of the page controller. Defaults to .horizontal
  • options:[UIPageViewController.OptionsKey:Any]: Any options to pass to the
    page view controller on creation. Defaults to nil
  • animated:Bool: Whether the page view controller should use animations.
    Defaults to true
  • pageControlActiveTint:UIColor: The colour to use for the active dot.
    Defaults to UIColor.black
  • pageControlInactiveTint:UIColor: The colour to use for the inactive dots.
    Defaults to UIColor.lightGray

Author

OiNutter, [email protected]

License

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

Latest podspec

{
    "name": "Flipbook",
    "version": "0.1.0",
    "summary": "An image slider plugin for iOS written in Swift.",
    "description": "Simple image slider plugin based on UIPageViewController.",
    "homepage": "https://github.com/OiNutter/Flipbook",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "OiNutter": "[email protected]"
    },
    "source": {
        "git": "https://github.com/OiNutter/Flipbook.git",
        "tag": "0.1.0"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "11.4"
    },
    "source_files": "Flipbook/Classes/*"
}

Pin It on Pinterest

Share This