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)
目前,它只是執行最後一個動畫,所以它只能從左到右移動。我怎樣才能讓它上下移動呢?