ios - Use two different UIViewAnimationCurves in the same animation -


I want to be able to use a UIViewAnimationCurve for rotations and the other for changes in status. Is this possible?

For example (in pseudo code);

Start animation // Rotation animation curve easily make some changes in the linear / / position in the InIn / // set position animation curve / rotate angle / make the animation less Edit: (CAAnimationGroup approach has been suggested below) - Though any ideas 2 different CABasic animation and a CAAnimationGroup are not started animation are not started?

CABasicAnimation * postionAnimation = [with CABasic Animation Animation: @ "status"]; PostionAnimation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear]; PostionAnimation.toValue = [NSVL Value WithCGPoint: [Self Conversion Point ToWorldSpaceFromViewSpace: self.spriteView.position]]; PostionAnimation.delegate = self; CABasicAnimation * rotationAnimation = [with CABasic Animation Animation: @ "Transform .z"]; Rotation animation TimingFunction = [CameticTiming FunctionWidthName: KCAMADitimingFunctionAseOutOutAus]; Rotation animation.Tavaluos = [NSNumber Number: Flowmet: seprocetviewview.engal = = mogi] ;; Rotation animation. Delegate = self; CA Animation Group * Animation Group = [CA Animation Group Animation]; Animation group Period = self.clockSpeed; Animation group.action = [NSArray arrayWithObjects: postionAnimation, RotationAnimation, Zero]; // animation display [self.spriteView.layer addAnimation: Group for AnimationKA: Zero]; The best bet for using multiple calls to anamat is: Delay: Options: Animation:

The code can look like this:

  [UIView animateWithDuration: .5 delay: 0 options: UIViewAnimationOptionCurveEaseInOut Animation: ^ {view1.center = CGPointMake (x, y); } Completion: ^ {// code running when this animation ends}]; [UIView Animative With Clutter: .5 Delay: .5 Options: UIViewAnimationOptionCurveLinear Animation: ^ {view2.center = CGPointMake (x2, y2); } Completion: ^ {// code running when this animation ends}];  

If you use CAAnimationGroups, there are many problems.

First of all, the animation group determines the animation curve for the whole group. I do not think you can specify different curves for each sub animation (though I believe I have not tried to do this.)

Second, if you add animation to a group If not, then representative of personal animations can not be found only in representative groups of animation group.


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -