Hey all,
i have little problem with my code. I want to add a footer to a uitableview-section, but that's not my problem.
My problem is that i want to have rounded corners on my footer-view, but not on all corners, just the two on the bottom. But the corners are just too dark and i don't know why...
Heres my code:
- (void)drawRect:(CGRect)rect {
float radius = 10.0f;
CGContextRef context = UIGraphicsGetCurrentContext();
CGFloat strokeColorArray[4] = {0.35f,0.35f,0.35f,1.0f};
CGContextSetStrokeColor(context, strokeColorArray);
CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1);
CGContextSetLineWidth(context, 1.0);
CGContextBeginPath(context);
CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMinY(rect));
CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMinY(rect));
CGContextAddArc(context, CGRectGetMaxX(rect) - radius, CGRectGetMaxY(rect) - radius, radius, 0, M_PI / 2, 0);
CGContextAddArc(context, CGRectGetMinX(rect) + radius, CGRectGetMaxY(rect) - radius, radius, M_PI / 2, M_PI, 0);
CGContextClosePath(context);
CGContextFillPath(context);
CGContextMoveToPoint(context, CGRectGetMaxX(rect), CGRectGetMinY(rect));
CGContextAddArc(context, CGRectGetMaxX(rect) - radius, CGRectGetMaxY(rect) - radius, radius, 0, M_PI / 2, 0);
CGContextAddArc(context, CGRectGetMinX(rect) + radius, CGRectGetMaxY(rect) - radius, radius, M_PI / 2, M_PI, 0);
CGContextAddLineToPoint(context, CGRectGetMinX(rect), CGRectGetMinY(rect));
CGContextDrawPath(context, kCGPathStroke);
}
Here's a picture of my problem: http://img195.imageshack.us/img195/9834/bildkw.png
Can you see the darker corners? How can i fix that?
Thank you
Sebastian