Explicit Additive Animation - Bounds and Opacity
| Originator: | SoCalledNonFlipped | ||
| Number: | rdar://12085417 | Date Originated: | 13-Aug-2012 09:00 AM |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.8 |
| Classification: | UI/Usability | Reproducible: | Always |
13-Aug-2012 09:00 AM Kevin Doughty: Summary: Bounds and opacity explicit additive animation do not function as expected. The usage pattern I use is as follows: In a transaction with actions disabled, set the new model value of the property. Then create an additive CABasicAnimation with a .5,0,.5,1 timing function. The fromValue is the old model value minus the new model value. The toValue is zero, NSZeroPoint, NSZeroSize, NSZeroRect, or the identity transform. Then add the animation to the layer with a keyPath of nil. It is intended to have many animations of the same keyPath running concurrently. Steps to Reproduce: Included workspace contains two projects showing bounds and opacity issues. Expected Results: Beautiful curves without keyframe animation, blocking, discrete jumps, and typical presentation animation angles. It is a great way to respond to user events. Actual Results: Opacity appears to crop values between 0 and 1 after each animation is added, not just once at the end which is what would be needed. Rect animation appears to give the absolute value for width and height, when I need negative values. The workaround for bounds animation is to animate @"bounds.size", but I do not know a workaround for opacity. Regression: Rect animation worked properly in 10.5 Leopard. Notes: I plan on submitting a feature request for implicit "seamless" additive animation and view animation soon. 13-Aug-2012 09:00 AM Kevin Doughty: 'AdditiveAnimationTests.zip' was successfully uploaded 20-Sep-2012 02:48 PM Kevin Doughty: I added the following line: NSLog(@"layer:%f; presentation:%f;",main.opacity,[main.presentationLayer opacity]); to the end of the testOpacity function, outside of the transaction. If you rapidly click the opacity test button, logging will report the presentation layer's opacity correctly approaches 0.5 but this is not what appears visually, so now I suspect the problem is with CARenderer. The most recent version can be downloaded from: https://github.com/KevinDoughty/AdditiveAnimationTests I decided not to bombard you with file updates for a single line of code. 09-Mar-2013 03:26 PM Kevin Doughty: I apologize for filing two issues in one bug report. Disregard the rect animation problem if you must, because it has a workaround, using an animation group with separate position and size animations. The important one is additive opacity animation. Please please please fix this. Thanks!
Comments
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!