Amos
unread,Jun 22, 2010, 3:14:06 PM6/22/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to iPhone Wax
I'm really enjoying using wax. It allows me to get stuff done more
quickly than I could otherwise.
I've run into a strange problem. I'm creating a ca animation and
setting its delegate to my view controller.
animation = CABasicAnimation:animationWithKeyPath("opacity")
animation:setDuration(0.5)
animation:setRepeatCount(6)
animation:setAutoreverses(true)
animation:setFromValue(NSNumber:numberWithFloat(0))
animation:setToValue(NSNumber:numberWithFloat(1))
animation:setDelegate(self)
myLayer:addAnimation_forKey(animation, "blink")
I have a delegate call back function defined.
function animationDidStop_finished(self, theAnimation, flag)
print("animation stopped")
end
When the animation is cancelled before it ends (by calling
myLayer:removeAllAnimations() ) then the delegate call back function
works fine. However, when the animation finishes on its own the
program crashes rather than calling the delegate callback function.
There is no error message. If I use the debugger I get: Program
received signal: “EXC_BAD_ACCESS”
I note that if I comment out the delegate callback function then the
program doesn't crash (though the call back obviously doesn't get
called).
Does anyone have any ideas about what may be going on?
Thanks!
-Amos