I have a strange problem when I try to draw rectangles which overlap one another. See the image below:
As you can see, the top line is ticker than others (bottom and vertical ones), in particular ticker than the line separating the rectangles. I used the following code:
for (int i = 0; i < 7; i++)
{
(...)
CGContextBeginPath(context);
CGContextSetStrokeColorWithColor(context, [UIColor blackColor].CGColor);
CGContextSetLineWidth(context, self.cellBorder);
CGRect dayRect;
if (i > 0)
dayRect = CGRectMake(i*cellWidth+self.marginX - 1, 0, cellWidth, cellHeight);
else
dayRect = CGRectMake(i*cellWidth+self.marginX , 0, cellWidth, cellHeight);
CGContextStrokeRect(context, dayRect);
}
Any suggestion?