     }
     
     fileprivate func hide() {
-        
+//        print("hide \(lastPoint)")
     }
 }

    
    fileprivate var startingPoint = CGPoint(x: 0, y: 0)
    fileprivate var currentPoint = CGPoint(x: 0, y: 0)
    fileprivate var deltaY: CGFloat = 0.0
    
    fileprivate var ovalLine: CAShapeLayer!
    fileprivate var smileyLine: CAShapeLayer!

        switch regonizer.state {
        case .began:
            startingPoint = regonizer.translation(in: self)
            print("began : \(startingPoint) \(currentPoint) \(lastDeltaY)")
        case .changed:
            currentPoint = regonizer.translation(in: self)
            deltaY = currentPoint.y - startingPoint.y
//            print("deltaY : \(deltaY)")
            

            smileyLine.path = drawSmileyPath(from: deltaY)
            
            
            
        case .cancelled, .ended:
            lastPoint = regonizer.translation(in: self)
            
//            let delta = currentPoint.y - startingPoint.y
            lastDeltaY = max(-45, min(45, deltaY))
            
            print("cancelled \(lastDeltaY)")
            hide()
        default:
            return
        }
