Althoug I read everywhere that the method signature has a BOOL for finished, I do never get a false. It is always true. And now the strange thing:
When I NSLog that out with %d, it is always either 32 or 40. Other BOOLs I have are either 1 or 0. That makes no sense. So: Not a bool, right?
What’s that instead, really?
The method signature for the did stop delegate selector is
The
finishedparameter is anNSNumberthat wraps up a boolean value. In Objective-C and other languages, any non-zero value is considered true (even negative numbers).You can call
[finished boolValue]on the NSNumber instance to get a trueBOOL,YESorNOvalue.The
finishedboolean value will beNOif the animation was cancelled or otherwise interrupted before completing it’s full animation. If the animation ran through fully, then it will beYES.From the docs: