   /// Circle view with icon for sliding images. You can override it with your custom view.
   open var sliderCircle: UIView
 
+  /// Enum that describes which direction the slider will slide from.
+  open var slideDirection: SlideDirection
+    
   /// Generic initializer with views
   ///
   /// - Parameters:
   ///   - frame: Frame size
   ///   - firstView: First view - should have size equal to frame and second view
   ///   - secondView: Second view - should have size equal to frame and second view
-  public init(frame: CGRect, firstView: UIView, secondView: UIView) {
+  public init(frame: CGRect, firstView: UIView, secondView: UIView, sliderImage: UIImage? = nil, slideDirection: SlideDirection? = nil) {
     self.firstView = firstView
     self.secondView = secondView
-    sliderCircle = SlidableImage.setupSliderCircle()
+    self.sliderCircle = SlidableImage.setupSliderCircle(sliderImage: sliderImage)
+    self.slideDirection = slideDirection ?? .right
     super.init(frame: frame)
 
     initializeViews()

//

import UIKit

/// Super easy Slider for before&after images
open class SlidableImage: UIView {

  ///
  /// - Parameter maskLocation: Position of slider
  open func updateMask(location maskLocation: CGFloat) {
    var maskRectPath: UIBezierPath
    let mask = CAShapeLayer()
    switch slideDirection {
      case .left:
        maskRectPath = UIBezierPath(rect: CGRect(x: maskLocation,
                                                 y: bounds.minY,
                                                 width: bounds.width,
                                                 height: bounds.height))
      case .right:
        maskRectPath = UIBezierPath(rect: CGRect(x: bounds.minX,
                                                 y: bounds.minY,
                                                 width: maskLocation,
                                                 height: bounds.height))
      case .top:
        maskRectPath = UIBezierPath(rect: CGRect(x: bounds.minX,
                                                 y: maskLocation,
                                                 width: bounds.width,
                                                 height: bounds.height))
      case .bottom:
        maskRectPath = UIBezierPath(rect: CGRect(x: bounds.minX,
                                                 y: bounds.minY,
                                                 width: bounds.width,
                                                 height: maskLocation))
    }
    mask.path = maskRectPath.cgPath
    secondView.layer.mask = mask
    sliderCircle.center.x = maskLocation
  }

