我對圖形或繪圖沒有任何瞭解,所以我認爲這就是爲什麼我無法弄清楚要尋找什麼來解決這個問題。在UITableViewCell中繪製一條實線
這是我在我的UITableViewCell的drawRect
- (void)drawRect:(CGRect)rect {
[super drawRect:rect];
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(ctx, 0.0, 0.0, 0.0, 1.0);
CGContextSetLineWidth(ctx, 0.25);
for (int i = 0; i < [columns count]; i++) {
CGFloat f = [((NSNumber*) [columns objectAtIndex:i]) floatValue];
CGContextMoveToPoint(ctx, f, 0);
CGContextAddLineToPoint(ctx, f, self.bounds.size.height);
}
CGContextStrokePath(ctx);
}
了我想這應該是一條黑色的線,但該線是灰色的,有什麼背景融合。我如何繪製一條不受背景圖像影響的實線?我已經嘗試了所有混合模式的思維,也許一個人會像混合模式一樣,因爲我不想混合,但是所有畫線都以某種方式與背景混合。