iPhone: CGPathMutable updating?
iPhone: CGPathMutable updating?
- Subject: iPhone: CGPathMutable updating?
- From: "Eric E. Dolecki" <email@hidden>
- Date: Mon, 11 Jan 2010 13:30:05 -0500
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.
?
_______________________________________________
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