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 <kyle.slu...@gmail.com> wrote:

> On Thu, Dec 3, 2009 at 12:07 PM, Eric E. Dolecki <edole...@gmail.com>
> 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 (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 arch...@mail-archive.com

Reply via email to