If you are only interested in drawing that path and not calculating the points to do something else with them, then you could stroke the path only up until t=0.5.
You can do this with a CAShapeLayer
by setting the strokeStart
and strokeEnd
properties. The appearance of the stroke can be properties like strokeColor
and lineWidth
. I recommend that you look at the documentation for the full list of properties.
The code would look something like this (I didn't run this so there may be typos etc.):
CAShapeLayer *halfBezier = [CAShapeLayer layer];
// use the full path
halfBezier.path = [yourFullPath CGPath];
// configure the appearance
halfBezier.fillColor = [[UIColor clearColor] CGColor];
halfBezier.strokeColor = [[UIColor redColor] CGColor];
halfBezier.lineWidth = 2.0;
// 0.0 ≤ t ≤ 0.5
halfBezier.strokeStart = 0.0; // the default value (only here for clarity)
halfBezier.strokeEnd = 0.5; // only up until t=0.5
// add this layer to the view's layer where it is supposed to be drawn
[yourView.layer addSublayer:halfBezier];