Re: iPhone: CGPathMutable updating?
Re: iPhone: CGPathMutable updating?
- Subject: Re: iPhone: CGPathMutable updating?
- From: "Eric E. Dolecki" <email@hidden>
- Date: Mon, 11 Jan 2010 16:40:20 -0500
Nevermind - I found out my problem. Sorry for the noise.
On Mon, Jan 11, 2010 at 1:30 PM, Eric E. Dolecki <email@hidden> wrote:
> I am using a CGPathMutable to draw the hand on an analog clock:
>
> minuteHandPath = CGPathCreateMutable();
>
> CGPathMoveToPoint(minuteHandPath, nil, center.x, center.y);
>
> CGPathAddLineToPoint(minuteHandPath, nil, center.x, center.y - 105);
>
> CGPathCloseSubpath(minuteHandPath);
>
> minuteHandLayer = [CAShapeLayer layer];
>
> minuteHandLayer.path = minuteHandPath;
>
> UIColor *myStrokeColor2 = [UIColor colorWithHue:0.6 saturation:0.24
> brightness:0.71 alpha:1.0];
>
> minuteHandLayer.strokeColor = myStrokeColor2.CGColor;
>
> minuteHandLayer.lineWidth = 2.0;
>
> [rootLayer addSublayer:minuteHandLayer];
>
>
> In another method I would like to update this, say to change the color of
> it. How can I do this? Presently I have tried:
>
>
> - (void) myMethod {
>
> minuteHandPath = CGPathCreateMutable();
>
> //...
>
> }
>
>
> This gives me an error. I don't see a way yet to clear the path out and
> redraw it using CGPathMoveToPoint, etc.
>
>
> ?
>
--
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