I know there is some kind of animation grouping mechanism in core animation. So lets say I have two CABasicAnimation firstAnimation
and secondAnimation
. How would I group these and how would I kick off the group to start animating?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
You'll want to use the CAAnimationGroup class. Create an array containing the animations you want, and set the AnimationGroup's
animations
property to that array. CAAnimationGroup is a subclass of CAAnimation, so you can add it to a layer using[layer addAnimation:forKey:]
like you would a regular animation. Once added to a layer, all animations in a group execute concurrently.I would suggest reading the CAAnimationGroup Reference first. There are a number of implementation details worth understanding before you use it. For example:
delegate
property of individual animations is ignored.removeOnCompletion
property of individual animations is ignored.delegate
andremoveOnCompletion
properties.animations
property of CAAnimationGroup is copied, not retained.