0
votes

I have an image that needs to increase in size over time. How would I go about doing that?

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

For the actual function I am confused how to write it.

1

1 Answers

1
votes

If you want a fluid animation, use this:

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