I have a drawRect and I want to fill in the rect specified with a certain color. How do I do so? So far I have tried the following:
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor colorWithWhite:29/255.f alpha:1.0].CGColor);
CGContextFillRect(context, rect);
}
This doesn't seem to work