如何将移动图像从一个 imageView 的中心移动到另一个? (Swift)

How to animate moving image from center of one imageView to another? (Swift)

如何将移动图像从一个 UIIMageView 动画化到另一个 UIImageView?

let center = imgView1.center
UIView.animate(withDuration: 0.5, animations: {
      self.imgView1.center = self.imgView2.center
}) { _ in
      self.imgView2.image = self.imgView1.image
      self.imgView1.image = nil
      self.imgView1.center = center
}