iphone - Grouping two Core Animations with CAAnimationGroup causes one CABasicAnimation to not run -


I have two animations that I am trying to perform on IIS 3.1.2 on the UILBlip on iPhone. UILabel Rocks before and after:

  CAKeyframeAnimation * rock; Rock = [CAKeyframeAnimation with animation: @ "transform.rotation.z"]; [Rock Set Bighttime: 0.0f]; [Rock set duration: 5.0]; [Rock set rapattack: 10000]; NSMutableArray * Value = [NSMutableArray array]; Moving while * mathematics = [[moving image] init]; // Center's starting position [add values: [math degree number: 0]]; // Right right [add value to object: [math degree number: -10]]; // Turn left [values ​​addObject: [Math Degree Number: 10]]; // re-center [add value object: [math degree number: 0]]; // Set the value for the animation [rock set value: value]; [Math release];  

The second zooms to the UILB so that it grows:

  NSVVW = value = zero; CABasicAnimation * Animation = Zero; CATransform3D conversion; Animation = [with CABasic Animation Animation: @ "Transform"]; Transform = cateriform 3D macescale (3.5 f, 3.5 f, 1.0 f); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation Setup: Value]; Conversion = caterentform 3D MacSecell (1.0 F, 1.0 F, 1.0F); Value = [NSVLite valueWithCatransform3D: Transform]; [Animation setfavalvalue: value]; [Animation setsupervers: yes]; [Animation Setdown: 30.0F]; [Animation server count: 10000]; [Animation set bittimes: 0.0f];  

One of these animations works directly with UILL layer layer.

However, if I try to group the animation together, then the first "rocking" animation does not work:

  ca-animation group * theGroup = [CA Animation group animation]; TheGroup.duration = 5.0; TheGroup.repeatCount = 10000; TheGroup.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear]; TheGroup.animations = [NSArray arrayWithObjects: [self-rock animation], [self zoom animation], zero]; // You can add more / add animation group to layer [[self-layer] addAnimation: theGroup forKey: @ "zoomAndRotate"];  

The sequence of adding animation to the group does not matter. Instead of zooming, like above, I tried to change the boundaries, but it was also unsuccessful, any information would be greatly appreciated. Thank you.

You are trying to animate two changes in a property simultaneously, your conversion of CALayer In the first animation, you are using an assistant keypath to change the transformation to create rotation, and in the second you are directly converting to create a scaling. The second animation is overwriting for the first time, because you are creating a complete change that is animating only the scale and between them.

It appears that you can generate auxiliary level and rotation by using the helpful keypath for your assistant. Both animations If you change your code on the scaling animation to read, then

  Seabassic animation * Animation = zero; Animation = [with CABasic animation animation: @ "transform. Scale"]; [Animation set-to-value: [NSNumber number double double: 3.5]]; [Animation SetFrive Value: [NSNumber Number Doubled: 1.0]]; [Animation setsupervers: yes]; [Animation Setdown: 30.0F]; [Animation server count: 10000]; [Animation set bittimes: 0.0f];  

You should be able to rock and scrape on your layer.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -