Latest 0.1.1
Homepage https://github.com/AdieOlami/Lope
License MIT
Platforms ios 12.1
Authors

[Coverage]()
[Documentation

Awesome

Version

Language

Git
Twitter
LinkedIn
eMail

This is an easy and Elegant SliderView which you can easily implemet in your application.

[Build Status][travis-url]

Lope gives you a smooth and easy experience when implemeting in your app. It is easy to customize and modify.

Installation

Cocoapods:

pod install 'Lope'

Cartage:

Coming Soon

Usage example

Development setup

Initiate Lope in your UIViewController like this

import Lope

var lope: Lope!

call the lope in your viewDidLoad and access other properties

override func viewDidLoad() {
    super.viewDidLoad()

    view.backgroundColor = .white
    lope = Lope(frame: CGRect.zero)
    lope.delegate = self
    lope.translatesAutoresizingMaskIntoConstraints = false
    self.view.addSubview(lope)
    setup()

}

Programmatically: create your function give it any name

func setup() {

    NSLayoutConstraint.activate([
    //            lope.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0),
    //            lope.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0),

    lope.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 0),

    lope.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
    lope.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
    lope.heightAnchor.constraint(equalToConstant: 64),
    ])
}

Delegate method on what to do on completion

extension ViewController: LopeDelegate {
    func startSlide(_ start: Bool) {
        print("startSlide Lope")
    }

    func endSlide(_ end: Bool) {
        print("endSlide Lope")
        if end {
            let alert = UIAlertController(title: "Lope", message: "Slide Done", preferredStyle: UIAlertController.Style.alert)
            alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
            self.present(alert, animated: true, completion: nil)
        }
    }

}

Other accessible variables

sliderBackgroundColor: UIColor? = .black
baseViewBackgroundColor: UIColor? = .gray
titleTextColor: UIColor? = .black

Release History

  • 0.1.1
  • CHANGE: Update docs (module code remains unchanged)

Meta

Adie Olalekan – @AdieOlami[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/AdieOlami/Lope

Contributing

  1. Fork it (https://github.com/AdieOlami/Lope/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Latest podspec

{
    "name": "Lope",
    "version": "0.1.1",
    "summary": "A SliderView written in swift just for you.",
    "description": "This library helps you perfom sliding actions",
    "homepage": "https://github.com/AdieOlami/Lope",
    "screenshots": "https://raw.githubusercontent.com/AdieOlami/Lope/master/Lope.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adie Olalekan": "[email protected]"
    },
    "social_media_url": "https://twitter.com/AdieOlami",
    "platforms": {
        "ios": "12.1"
    },
    "swift_versions": "5.0",
    "source": {
        "git": "https://github.com/AdieOlami/Lope.git",
        "tag": "0.1.1"
    },
    "source_files": "Lope/**/*.{h,m,swift}"
}

Pin It on Pinterest

Share This