首页 文章

随着时间的推移增加图像大小?

提问于
浏览
0

我的图像需要随着时间的推移而增加 . 我该怎么做呢?

var timer = NSTimer.scheduledTimerWithTimeInterval(0.4,target:self,selector:Selector(“grow”),userInfo:nil,重复:true)

对于实际的功能我很困惑如何写它 .

1 回答

  • 1

    如果您想要流畅的动画,请使用:

    UIView.animateWithDuration(0.4, animations: { () -> Void in
        imageView.transform = CGAffineTransformMakeScale(2.0, 2.0)
    })
    

相关问题