• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Animation : are text attributes animatable ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Animation : are text attributes animatable ?


  • Subject: Core Animation : are text attributes animatable ?
  • From: Rodolfo Niborski <email@hidden>
  • Date: Thu, 28 Aug 2008 01:46:30 +0200

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Animation : are text attributes animatable ?
      • From: Matt Long <email@hidden>
  • Prev by Date: Tiger Dictionary.app Format or Application
  • Next by Date: [Moderator] Re: iphone SDK questions
  • Previous by thread: Tiger Dictionary.app Format or Application
  • Next by thread: Re: Core Animation : are text attributes animatable ?
  • Index(es):
    • Date
    • Thread