         lineAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
         lineAnimation.fromValue = 0.0
         lineAnimation.toValue = 1.0
-        lineAnimation.delegate = self
+        lineAnimation.fillMode = kCAFillModeForwards
+        lineAnimation.isRemovedOnCompletion = false
         lineAnimation.setValue(lineLayer, forKey: "LineLayer")
         
         return lineAnimation

    }
    
}

extension SamuraiTransition: CAAnimationDelegate {
    
    public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
        if let layer = anim.value(forKey: "LineLayer") as? CAShapeLayer {
            layer.removeFromSuperlayer()
        }
    }
    
}


    }
    
    private func oneSideBezierPath(zanPosition: CGPoint, bottomX: CGFloat) -> UIBezierPath {
        
        let oneSidePath = UIBezierPath()
        oneSidePath.move(to: CGPoint(x: containerFrame.maxX, y: containerFrame.minY))
        oneSidePath.addLine(to: zanPosition)
