Skip to content

An animation library which you can install via CocoaPods. The inspiring derived from some website that have progress as you go further and deeper into an application for example. It is nice to see your progress.

License

lvh1g15/sliderProgress

Repository files navigation

SliderProgress

Version Platform iOS License MIT

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: Landonvagohughes3@gmail.com

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)
        }
    }
}

About

An animation library which you can install via CocoaPods. The inspiring derived from some website that have progress as you go further and deeper into an application for example. It is nice to see your progress.

Resources

License

Stars

Watchers

Forks

Packages

No packages published