Coder Social home page Coder Social logo

fullingswiper's Introduction

Png

CI Status Version License Platform

Gif

Usage

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

Requirements

  • swift 2.0, iOS8.0 ~

Installation

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

pod "FullingSwiper"

Example

It is the library which becomes able to return in Stack View in entire surface wipe.

Default Set

if let pushView = pushViewController, navigationController = navigationController {
    pushView.fullingSwiper
        .set(navigationController: navigationController)
    navigationController.pushViewController(pushView, animated: true)
}

Set Handlers

Set 'popViewController' handler Set 'shouldBeginGesture' handler Set 'completed' handler

fullingSwiper
    .set(navigationController: navigationController)
    .poping() { _ in
        print("Poping!")
    }
    .shouldBeginGesture() { _ in
        print("shouldBeginGesture!")
    }
    .completed() { _ in
        print("completed!")
    }

Set Paramators

Param hideRatio is the value that less than hideRatio cancel pop. Default is 0.2. Param duration is the time when (pop or push) animation. Default is 0.3. Param scale is under view scale when (pop or push) animation. Default is 1.

pushView.fullingSwiper
    .set(navigationController: navigationController)
    .hideRatio(0.3)
    .animateDuration(0.1)
    .animateScale(0.95)

Point to be noted

When You set stack view more than two

Please set fullingSwiper.reset() by all means in viewDidAppear

override func viewDidAppear(animated: Bool) {
    super.viewDidAppear(animated)

    // ☆ Set
    fullingSwiper.reset()
}

When you support iOS8

Please do not set fullingSwiper in viewWillAppear

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

    // ☆ Do not set
    if let navigationController = navigationController {
        fullingSwiper.set(navigationController: navigationController)
    }
}

Author

ikemai

License

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

fullingswiper's People

Contributors

ikemaica avatar

Watchers

Jonathan Duty avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.