I have an image (innerCircle) that is growing and shrinking in scale with an animation using the following:
UIView.animateWithDuration(5, delay:0, options: [.Repeat, .Autoreverse], animations: { () -> Void in
self.innerCircle.transform = CGAffineTransformMakeScale(3.5, 3.5)
}) { (finished: Bool) -> Void in
UIView.animateWithDuration(1, animations: { () -> Void in
self.innerCircle.transform = CGAffineTransformIdentity
I am trying to get the current size of the image at any point during the animation so that I can check when it grows beyond a certain point. I want to do this so I can change a label of text from "Inhale" to "Exhale" and visa-versa.
I have tried using
let innerCircleWidth = self.innerCircle.image!.size.width
but that only gets the initial width value. It does not update.
Many thanks!