Swiftpack.co - Package - quver/SlidableImage

SlidableImage

Build Status codecov codebeat badge GitHub license Platform Version Swift Package Manager compatible Readme Score

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

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

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: 9
Help us keep the lights on

Dependencies

Used By

Total:

Releases

3.0.3 - Sep 29, 2018

Bug fix for Swift 4.2

3.0.2 - Sep 29, 2018

3.0.1 - Mar 5, 2017

Full Changelog

Fixed bugs:

3.0.0 - Mar 4, 2017

2.0.0 - Jan 4, 2017

Implemented enhancements:

  • Adding the ability to pass in an image for the circle slider view. #4 (campierce88)

Merged pull requests:

  • [QT-6] Refactor #6 (quver)
  • [QT-1] Change slider from image to code #5 (quver)

Full Changelog