UIMotionEffect animations are overridden by UIView and CALayer property animations
| Originator: | smasuch | ||
| Number: | rdar://15180841 | Date Originated: | Oct 8, 2013 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 7.0.2 |
| Classification: | UI | Reproducible: | Always |
Summary: When animating a property of a view, such as the frame using UIView animation methods or the ContentsRect on the underlying layer, animations from a UIMotionEffect on the same property are overridden until they are reapplied by the motion effect later. The animations from the motion effect are set to be additive, but are not added to the property animations. Steps to Reproduce: 1. Run included sample code on an iOS device runing iOS 7. 2. Tilt the Expected Results: I expected a smooth movement of the square from the top to the bottom. Actual Results: The box jerked back to the horizontal center of the screen for a moment while moving downwards, then it moved back to the side and continued moving down to the bottom. Version: iOS 7.0.2 Notes: Workaround: after applying the property animation, look at the existing animations for the underlying layer. For each existing animation that is additive, create a new animation for the same key, set the toValue and fromValue to the toValue of the existing animation, set the fillMode to both, removedOnCompletion to No, and apply it to the layer. These animations are then replaced next time the motion effect fires, creating the illusion of having the same animation throughout. Configuration: iOS 7.0.2, iPhone 5S model A1533 Attachments: 'MotionEffectTest.zip' was successfully uploaded.
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!