views:

45

answers:

2

Hi, I draw a path using CGContext.

How can I later change one of the path attributes after drawRect was carried out (completed)? I want to be able to change the color of my path according to a slider value.

A: 

To set color use this function

CGContextSetRGBFillColor(context, RED, GREEN, BLUE, ALPHA);

where RED, GREEN, BLUE, ALPHA, stands for float values from 0 to 1

hecta
tried to call a [UIColor clearColor] from my Object after drawRect was carried out (completed) but doesn't seem to work. How do you do it?
iFloh
A: 

defined the property and added [setNeedsDisplay] during property change did the deed ...

iFloh