• 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
CATransformLayer doesn't support implicit animation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CATransformLayer doesn't support implicit animation?


  • Subject: CATransformLayer doesn't support implicit animation?
  • From: Indragie Karunaratne <email@hidden>
  • Date: Mon, 7 Feb 2011 22:43:28 -0700

I'm trying to animate a CATransformLayer (the transform layer is a sublayer of the layer of a layer hosting NSView). Here's my animation code:

    CGFloat zDistance = 850;
    CGFloat scaleFactor = BACK_COVER_WIDTH / self.transformLayer.bounds.size.width;
    CATransform3D rotation = CATransform3DMakeRotation(M_PI, 0.0, 1.0, 0.0);
    CATransform3D scale = CATransform3DMakeScale(scaleFactor, scaleFactor, 0.0);
    CATransform3D transform = CATransform3DConcat(rotation, scale);
    transform.m34 = 1.0 / -zDistance;
    CGPoint location = CGPointMake(CGRectGetMidX(self.layer.frame), CGRectGetMidY(self.layer.frame));
    [CATransaction begin];
    [CATransaction setAnimationDuration:1.0];
    self.transformLayer.transform = transform;
    self.transformLayer.position = location;
    [CATransaction commit];

self.transformLayer is a CATransformLayer with two sublayers, one for the front and one for the back (I'm creating a "flip" effect). However, this code just sets the position and transform without animation. So I thought that maybe transform doesn't support implicit animation, so I took that out and just tried setting the position, but that didn't animate either (and I know for sure that position supports implicit animation).

Am I doing something wrong or does CATransformLayer just not support implicit animation? The documentation does not say anything about it not supporting it, so I'm assuming it does._______________________________________________

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: CATransformLayer doesn't support implicit animation?
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Printing Appears Very Small in Lower-Left Corner of Page
  • Next by Date: Re: Printing Appears Very Small in Lower-Left Corner of Page
  • Previous by thread: Disable scrolling on NSScrollView
  • Next by thread: Re: CATransformLayer doesn't support implicit animation?
  • Index(es):
    • Date
    • Thread