How to Apply UIPanGestureRecognizer velocity to UIView Move in Swift

I have two UIView, the oGesture invisible on dietsView, for recognize gesture. and in dietsView.class have another view (dietsCells) I need scroll dietsCells in dietsView. the code work, but I need apply velocity at ended time

   var dietsCellsY: CGFloat!
    @objc func pan(pan:  UIPanGestureRecognizer){
        let translation = pan.translation(in: oGesture)
        let velocity = pan.velocity(in: oGesture)

        switch pan.state {
        case .began:
            dietsCellsY = dietsView.dietsCells.layer.position.y

        case .changed:
            let changedY = dietsCellsY + translation.y
            dietsView.dietsCells.layer.position.y = changedY

        case .ended:
            endedY = dietsView.dietsCells.layer.position.y
            let newY = dietsCellsY + translation.y

                UIView.animate(withDuration: 0,
                       options: UIViewAnimationOptions.curveEaseOut,
                       animations: {
                      dietsView.dietsCells.layer.position.y = newY
                },completion: nil)  

        default:
            break
       }
 }