CAAnimationDelegate methods animation argument mismatch

Originator:nskboy
Number:rdar://11586563 Date Originated:04-Jun-2012 04:50 PM
Status:Behaves correctly Resolved:June 7, 2012 1:22:32 AM
Product:iPhone SDK Product Version:5.1
Classification:Other Bug Reproducible:Always
 
04-Jun-2012 04:50 AM Roman Busyghin:
Summary:
In general I would like to remove CALayer from layer hierarchy after animation attached to this layer is finished. To do this I've configured CABasicAnimation and set its delegate to my view. However I can't detect my animation correctly because first argument in these delegate methods is not equal to my animation.

Steps to Reproduce:
1. Launch attached sample code

Expected Results:
Application should not crash

Actual Results:
Application crashes because of NSAssert.

Regression:
This is one of my first steps in learning Core Animation and I didn't notice it previously.

Comments

Sample code

http://clck.ru/d/-izyT5NF1AKBR


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!