次のコードがあります。
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGFloat commentHeight = 0;
CGSize commentSize = [self.highlightItem_.comment sizeWithFont:[UIFont fontWithName:kProximaNova size:18] constrainedToSize:CGSizeMake(rect.size.width, CGFLOAT_MAX) lineBreakMode:NSLineBreakByWordWrapping];
commentHeight = commentSize.height + 50;
CGContextSetRGBStrokeColor(context, 68/255.f, 68/255.f, 68/255.f, 1.0);
CGContextSetRGBFillColor(context, 68/255.f, 68/255.f, 68/255.f, 1.0);
CGContextSetLineJoin(context, kCGLineCapSquare);
CGContextSetLineWidth(context, 1.0);
CGMutablePathRef pathRef = CGPathCreateMutable();
CGPathMoveToPoint(pathRef, NULL, 0, rect.size.height - commentHeight);
CGPathAddLineToPoint(pathRef, NULL, 20, rect.size.height - commentHeight);
CGPathAddLineToPoint(pathRef, NULL, 25, rect.size.height - commentHeight - 10);
CGPathAddLineToPoint(pathRef, NULL, 30, rect.size.height - commentHeight);
CGPathAddLineToPoint(pathRef, NULL, rect.size.width, rect.size.height - commentHeight);
CGPathAddLineToPoint(pathRef, NULL, rect.size.width, rect.size.height);
CGPathAddLineToPoint(pathRef, NULL, 0, rect.size.height);
CGPathCloseSubpath(pathRef);
CGContextAddPath(context, pathRef);
//CGContextFillPath(context);
CGContextDrawPath(context, kCGPathFill);
CGPathRelease(pathRef);
}
どういうわけか、私が望む形を描いていません。実際には何も描画しません。私が間違っていることはありますか?