6
Mam drawRect i chcę wypełnić rect określony w określonym kolorze. Jak to zrobić? Do tej pory próbowałem następujące:jak mogę wypełnić drawRect w kolorze
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor colorWithWhite:29/255.f alpha:1.0].CGColor);
CGContextFillRect(context, rect);
}
nie wydają się działać
Zobacz ten link: http://stackoverflow.com/questions/2985359/how-to-fill-a-path-with-gradient-in-drawrect – Vishal
Sprawdź również: http://stackoverflow.com/questions/3800278/iphone-draw-transparent- rectangle-on-uiview-to -reveal-view-under – Vishal