SlidableImage

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

SlidableImage

Requirements

  • iOS 8
  • Swift 3.0

Instalation

This library support

  • Cocoapods
  • Swift Package Manager
pod 'SlidableImage', '~>2.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

GitHub