Easy to use library for before & after images. One-line initialization and very customizable API.
- iOS 8
- Swift 3.0
This library support
- Cocoapods
- Swift Package Manager
pod 'SlidableImage', '~>1.0'Common init with image
init(frame: CGRect, firstImage: UIImage, secondImage: UIImage)Gemeric init with views
init(frame: CGRect, firstView: UIView, secondView: UIView)updateMask(location maskLocation: CGFloat)First image container view. You can override it with your custom view
var firstView: UIViewSecond image container view. You can override it with your custom view.
var secondView: UIViewCircle view with icon for sliding images. You can override it with your custom view.
sliderCircle: UIViewlet slider = SlidableImage(frame: rect, firstView: firstSubView, secondView: secondSubView)
view.addSubview(slider)- Test with storyboards
Paweł Bednorz, Quver
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/
