【问题标题】:Increasing an images size over time?随着时间的推移增加图像大小?
【发布时间】:2015-06-01 22:01:42
【问题描述】:

我的图片需要随着时间的推移而增大。我该怎么做呢?

var timer = NSTimer.scheduledTimerWithTimeInterval(0.4, target: self, selector: Selector("grow"), userInfo: nil, repeats: true)

对于实际的功能,我很困惑如何编写它。

【问题讨论】:

    标签: xcode swift


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-30
      • 2017-08-30
      • 2011-03-07
      • 2013-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多