我对图形或绘图没有任何了解,所以我认为这就是为什么我无法弄清楚要寻找什么来解决这个问题。在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);
}
了我想这应该是一条黑色的线,但该线是灰色的,有什么背景融合。我如何绘制一条不受背景图像影响的实线?我已经尝试了所有混合模式的思维,也许一个人会像混合模式一样,因为我不想混合,但是所有画线都以某种方式与背景混合。