Hi everyone,

My question is twofold :
In the Core Animation Menu sample (Core Animation Programming Guide) the inclusion of this line of code :
selectedLayer.string = @"new text";
in the -changeSelectedIndex: method results in an animation being triggered : the old text fades out while the new text fades in. The same happens if the fontSize or the foregroundColor properties are modified. In the case of the fontSize, how can one achieve a continuous transition, with the letters themselves becoming bigger and bigger ?

And things happen to be different in my own code : I'm using a CALayoutManager and here is it's main method :

-(void)layoutSublayersOfLayer:(CALayer*) layer
{
  ...

  [CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat: 1.5] forKey: kCATransactionAnimationDuration]; [CATransaction setValue:[NSNumber numberWithBool: NO] forKey: kCATransactionDisableActions];
  int i = 0;
  for(CATextLayer *letter in layer.sublayers)
  {
    letter.bounds = CGRectMake(0.0, 0.0, side, side);
letter.position = CGPointMake(l - side / 2 - (i % a) * side, h - side / 2 - (i / a) * side);
    i++;
    letter.fontSize = side;
    letter.foregroundColor = [self randomColor];
  }
  [CATransaction commit];

  ...
}

While position gets animated, I don't get any animation on text attributes, not even the aforementioned fade in - fade out animation. Does someone know how to get all the properties animated ?

Thanks a lot,

Rodolfo
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to