ios - Swift - finding the size of a UIImageview after an animation is interrupted/cancelled? -


i'm creating game size of uiimage changing , user has press screen @ right time stop animation. end size compared fixed constant give user points based on how close were. there way use .removeallanimations() method , size @ time? tried using view.bounds, view.frame, view.layer.frame, , view.layer.bounds , they're wrong. there method altogether should using?

both uiview , uiviewcontroller (as nsview , nsviewcontroller) act caanimationdelegate has methods:

override func animationdidstop(anim: caanimation, finished flag: bool)         override func animationdidstart(anim: caanimation) 

so set delegate of animation whichever view, controller , use methods handle stop, start events.

e.g.

    let anim = caanimation()     ... set animation here     anim.delegate = self 

Comments