             zanLine = UIView(frame: CGRect(x: containerFrame.maxX, y: 0.0, width: 1.0, height: 1.0))
             zanEndPoint = .zero
             
-            let paths = maskPath(zanPosition: zanPoint)
-            oneSideMaskLayer = CAShapeLayer()
-            oneSideMaskLayer?.path = paths.oneSide.cgPath
-            
-            otherSideMaskLayer = CAShapeLayer()
-            otherSideMaskLayer?.path = paths.otherSide.cgPath
+            let maskLayers = maskLayer(zanPosition: zanPoint)
+            oneSideMaskLayer = maskLayers.oneSide
+            otherSideMaskLayer = maskLayers.otherSide
         }
         
         let oneSideView = zanTargetView.resizableSnapshotView(from: slice, afterScreenUpdates: false, withCapInsets: .zero)!

        
    }
    
    private func maskPath(zanPosition: CGPoint) -> (oneSide: UIBezierPath, otherSide: UIBezierPath) {
        
        let oneSidePath = UIBezierPath()
        oneSidePath.move(to: CGPoint(x: containerFrame.maxX, y: containerFrame.minY))
        let oneSideBottomPoint = containerFrame.maxX - ((containerFrame.maxX - zanPosition.x) * 2)
        oneSidePath.addLine(to: CGPoint(x: oneSideBottomPoint, y: containerFrame.maxY))
        oneSidePath.addLine(to: CGPoint(x: containerFrame.maxX, y: containerFrame.maxY))
        oneSidePath.addLine(to: CGPoint(x: containerFrame.maxX, y: containerFrame.minY))
        oneSidePath.close()
        
        let otherSidePath = UIBezierPath()
        otherSidePath.move(to: CGPoint(x: containerFrame.minX, y: containerFrame.minY))
        otherSidePath.addLine(to: CGPoint(x: containerFrame.minX, y: containerFrame.maxY))
        otherSidePath.addLine(to: CGPoint(x: oneSideBottomPoint, y: containerFrame.maxY))
        otherSidePath.addLine(to: CGPoint(x: containerFrame.maxX, y: containerFrame.minY))
        otherSidePath.addLine(to: CGPoint(x: containerFrame.minX, y: containerFrame.minY))
        otherSidePath.close()
        
        return (oneSidePath, otherSidePath)
    }
    
}

    public var zanLineColor = UIColor.black
    public var zanLineWidth: CGFloat = 1.0
    
    fileprivate weak var transitionContext: UIViewControllerContextTransitioning!
    fileprivate var containerView: UIView!
    
