我需要的是水平旋转图像,我使用UIView.animate,它工作正常,但问题是旋转时图像的位置改变。我试图使用锚点,但它没有奏效。swift 3.0水平旋转图像
当图像旋转时,我必须做些什么来不改变位置?
这是我的代码:
UIView.animate(withDuration: duration, delay: 0.5, options:
[.repeat,.curveEaseInOut,.transitionFlipFromLeft], animations: {
targetView.transform = CGAffineTransform(scaleX: -1, y: 1);
}) { finished in
}
感谢,
如果你能分享的代码,其中该块位于,那会很棒。否则,这很难帮助你。 – bearacuda13
@ bearacuda13它编辑 –