Swiftpack.co -  quver/SlidableImage as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
quver/SlidableImage
Fancy slider for before&after images
.package(url: "https://github.com/quver/SlidableImage.git", from: "3.0.4")

SlidableImage

iOS CI codecov codebeat badge GitHub license Platform Version Swift Package Manager compatible Readme Score Documentation

Easy to use library for before & after images. One-line initialization and very customizable API.

Requirements

  • iOS 9
  • Swift 5

Instalation

This library support

  • Cocoapods
  • Swift Package Manager
pod 'SlidableImage', '~>3.0'

Using

Constructor

Common init with image

init(frame: CGRect, views: Views)

Gemeric init with views

init(frame: CGRect, images Images)

Move slider

updateMask(location maskLocation: CGFloat)

Variables

Views tuple

var views: Views

Circle view with icon for sliding images. You can override it with your custom view.

var sliderCircle: UIView

Enum that describes which direction the slider will slide from.

var slideDirection: SlideDirection

// Possible values
.left, .right, .top, .bottom

Add border

addBorder(width: CGFloat, color: UIColor)

Remove border

removeBorder()

TODO

  • Test with storyboards

Author

Paweł Bednorz, Quver

License

SlidableImage Lib and Slider graphic are available under the MIT license. Check the LICENSE file for more information.

Images from http://www.comicsbeat.com/awesome-infographic-on-the-avengers-then-and-now/

GitHub

link
Stars: 31
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

3.0.4
2 years ago

Xcode 10.2 & Swift 5.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API