Latest 0.2.1
Homepage https://github.com/lvh1g15/sliderProgress
License MIT
Platforms ios 8.0
Dependencies SnapKit
Frameworks UIKit
Authors

Version

Platform iOS
License MIT

SliderProgressSliderProgress

Requirements

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

Installation

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

pod 'SliderProgress'

Author

Landon Vago-Hughes, Contact: [email protected]

License

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

Swipe down usage

This usage if for if you wish to swipe down and see how much you need to swipe down until the view will dismiss


import SliderProgress

class ViewController: UIViewController, UIScrollViewDelegate {

weak var progressBar: SwipeProgression!

override func viewDidLoad() {
    let progressions: SwipeProgression = SwipeProgression(frame: CGRect.zero)
    self.view.addSubview(progressions)
    progressions.setup()
    self.progressBar = progressions
    }

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    if progressBar == nil {
            self.dismiss(animated: true, completion: nil)
        } else {
            progressBar.animateWidth(scrollheight: 150, scrollviewcurrent: scrollView, targetviewcontroller: self)
        }
    }
}

Swipe up usage

The only difference in this use case is we have a function called swipeDownProgress which will let you know how much longer you have left until the end of the scrollView. The function itself just removes the view from the superview. The dismiss function is what I have added to show how it can be applied.

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    if progressBar == nil {
            self.dismiss(animated: true, completion: nil)
        } else {
            progressions.swipeUpProgress(scrollviewcurrent: scrollView)
        }
    }
}

Latest podspec

{
    "name": "SliderProgress",
    "version": "0.2.1",
    "summary": "Swipe to dismiss progress animation",
    "description": "An animation kit for some clean swipe to dismiss features. The method will create the animation and dismiss when you have reached a cetain offset. The view can be customised for colour and also how far you would like the user to swipe upwards until the view dismisses.",
    "homepage": "https://github.com/lvh1g15/sliderProgress",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "lvh1g15": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lvh1g15/sliderProgress.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "sliderdismissanimation/Classes/**/*",
    "frameworks": "UIKit",
    "dependencies": {
        "SnapKit": [
            "~> 3.0"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This