我最终做了这样的事情,效果很好:
CGPoint prevItemPosition2 = [self positionForItem: prevItem2 andMaxItem:maxItem inItems: items];
CGPoint prevItemPosition1 = [self positionForItem: prevItem1 andMaxItem:maxItem inItems: items];
CGFloat cpAngle = atan2f((prevItemPosition2.y - prevItemPosition1.y),
(prevItemPosition2.x - prevItemPosition1.x));
cpAngle += M_PI;
CGFloat magnitude = sqrtf(powf(prevItemPosition1.x - itemPosition.x, 2) +
powf(prevItemPosition1.y - itemPosition.y, 2)) / 3;
CGPoint angleComponents = CGPointMake(cos(cpAngle) * magnitude,
sin(cpAngle) * magnitude);
CGPoint cp = CGPointMake(prevItemPosition1.x + angleComponents.x,
prevItemPosition1.y + angleComponents.y);
CGContextAddQuadCurveToPoint(context, cp.x, cp.y, itemPosition.x, itemPosition.y);