Re: Question about aliasing (analog clock hands)
Re: Question about aliasing (analog clock hands)
- Subject: Re: Question about aliasing (analog clock hands)
- From: Scott Anguish <email@hidden>
- Date: Sun, 6 Dec 2009 00:21:09 -0500
not sure if this is helpful, but on http://www.abandoninplace.com/ in SampleCode, there is an example of using a dial created with Core Animation.
On Dec 3, 2009, at 3:34 PM, Eric E. Dolecki wrote:
> 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
_______________________________________________
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