I think I've been doing this wrong for the past year and a half of my iPhone development experience... I could use some knowledgeable clarification please!
As you may or may not know, UIView properties can be animated quite easily using the beginAnimations:forContext:
method, and wrap it up with a commitAnimations
call.
You can also set an animation delegate to perform actions when certain parts of the animation occur, such as starting, finishing etc.
I've been using UIView animations in my code for a long time and never had any serious problems, but I've just come across a section of the docs that I must have missed.
The documentation for UIView's setAnimationDidStopSelector:
states that any selector passed into this method should be of the form:
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
I haven't been doing that at all. I've been setting plain old doThis
and doThat
type selectors that take no parameters.
Is what I've been doing acceptable? Should I rewrite all my code to use the documented form? Or is that form simply for convenience if I need to know whether or not the animation completed before being stopped or needed to pass some context specific data to the method?