This is an easy and Elegant SliderView which you can easily implemet in your application.
Lope gives you a smooth and easy experience when implemeting in your app. It is easy to customize and modify.
Cocoapods:
pod install 'Lope'
Cartage:
Coming Soon
import Lope
var lope: Lope!
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
lope = Lope(frame: CGRect.zero)
lope.delegate = self
lope.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(lope)
setup()
}
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),
])
}
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)
}
}
}
sliderBackgroundColor: UIColor? = .black
baseViewBackgroundColor: UIColor? = .gray
titleTextColor: UIColor? = .black
- 0.1.1
- CHANGE: Update docs (module code remains unchanged)
Adie Olalekan – @AdieOlami – [email protected]
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/AdieOlami/Lope
- Fork it (https://github.com/AdieOlami/Lope/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request