0
我正在尝试使从左到右移动屏幕的波动起来,并且同时我希望它稍微上下移动。继承人代码:试图在swift中移动x和y字段中的图像
UIView.animateWithDuration(2.5, delay: 0,
options: .Repeat | .Autoreverse, animations: {
self.wavesImg.center.y += 50
self.wavesImg.center.x -= self.wavesImg.image!.size.width/7
}, completion: nil)
目前,它只是执行最后一个动画,所以它只能从左到右移动。我怎样才能让它上下移动呢?