@objc private func blueViewTapped(_ sender: UITapGestureRecognizer) {
guard sender.state == .ended else {return}
let startPosition = (blueView.center.x, blueView.center.y)
let finishPosition = CGPoint(x: cyanView.center.x, y: blueView.center.y)
let animation = CABasicAnimation(keyPath: "transform.rotation.z")
animation.duration = 2.0
animation.fromValue = 0.0
animation.speed = 0.5
animation.toValue = 315 * Float.pi / 180
animation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
animation.fillMode = .forwards
animation.delegate = self
let animation2 = CABasicAnimation(keyPath: "position")
animation2.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
animation2.duration = 2.0
animation2.speed = 0.5
animation2.fromValue = startPosition
animation2.toValue = finishPosition
animation2.fillMode = .forwards
animation2.delegate = self
blueView.layer.add(animation, forKey: "transform.rotation.z")
blueView.layer.add(animation2, forKey: "positon")
// blueView.layer.position.x = cyanView.layer.position.x
//
}