UIBezierPath point at fraction of path
问题 Given an arbitrary UIBezierPath , I'm looking for a way to get a point at a fraction of the length of that path. Example: UIBezierPath *path = [UIBezierPath bezierPath]; [path moveToPoint:CGPointMake(200.0, 200.0)]; [path addLineToPoint:CGPointMake(200.0, 400.0)]; CGPoint p = [path pointAtFraction:0.5]; p should be {x: 200.0, y: 300.0} in this case. I'm aware that this simple example could be calculated, but I'm looking for a solution that fits ANY UIBezierPath (arcs, rounded rects, etc.)