drawRect があり、特定の色で指定された rect を塗りつぶしたいと考えています。どうすればいいですか?これまでのところ、次のことを試しました。
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor colorWithWhite:29/255.f alpha:1.0].CGColor);
CGContextFillRect(context, rect);
}
これはうまくいかないようです