• 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
Re: Question about aliasing (analog clock hands)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about aliasing (analog clock hands)


  • Subject: Re: Question about aliasing (analog clock hands)
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Thu, 3 Dec 2009 15:34:41 -0500

Will do. One question - when I am rotating around z - it's using the top
left of the shapeLayer as the anchor point. Trying to set it differently
isn't changing the anchor point...

CABasicAnimation *rotationAnimation;

rotationAnimation =[CABasicAnimation animationWithKeyPath:@
"transform.rotation.z"];

[rotationAnimation setFromValue:DegreesToNumber(0)];

[rotationAnimation setToValue:DegreesToNumber(360)];

[rotationAnimation setDuration:2.0f];

[rotationAnimation setRepeatCount:10000];

[shapeLayer setAnchorPoint:CGPointMake(240, 160)];

[shapeLayer addAnimation:rotationAnimation forKey:@"rotate"];

It just rotates around the top left corner (meaning it comes into and out of
view)... I am looking to simply spin the shape where it sits from it's
center.



On Thu, Dec 3, 2009 at 3:17 PM, Kyle Sluder <email@hidden> wrote:

> On Thu, Dec 3, 2009 at 12:07 PM, Eric E. Dolecki <email@hidden>
> wrote:
> > If I use CAShapeLayer, can I use CGAffineTransform on it? I need to pour
> > through the docs now I guess.
>
> Yes, please brush up on Core Animation.  You can apply arbitrary
> transformations to a layer, or you can use the rotation/position
> properties of the layer itself and let CA take care of all the nested
> coordinate systems for you.  Since the iPhone uses layers for pretty
> much all drawing, you're going to need to get a handle on Core
> Animation sooner rather than later.
>
> --Kyle Sluder
>



--
http://ericd.net
Interactive design and development
_______________________________________________

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: Question about aliasing (analog clock hands)
      • From: Scott Anguish <email@hidden>
    • Re: Question about aliasing (analog clock hands)
      • From: David Duncan <email@hidden>
References: 
 >Question about aliasing (analog clock hands) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Question about aliasing (analog clock hands) (From: Kyle Sluder <email@hidden>)
 >Re: Question about aliasing (analog clock hands) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Question about aliasing (analog clock hands) (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Question about aliasing (analog clock hands)
  • Next by Date: Re: Question about aliasing (analog clock hands)
  • Previous by thread: Re: Question about aliasing (analog clock hands)
  • Next by thread: Re: Question about aliasing (analog clock hands)
  • Index(es):
    • Date
    • Thread