我有一张图像需要随着时间的推移而增加尺寸。我该如何去做呢?
var timer = NSTimer.scheduledTimerWithTimeInterval(0.4, target: self, selector: Selector("grow"), userInfo: nil, repeats: true)
对于实际的功能,我很困惑如何编写它。
最佳答案
如果您想要流畅的动画,请使用此:
UIView.animateWithDuration(0.4, animations: { () -> Void in
imageView.transform = CGAffineTransformMakeScale(2.0, 2.0)
})
关于xcode - 随着时间的推移增加图像尺寸?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29319940/