Place images along a bezier path

I guess you want something like this: You can find my complete demo app project in this github repository. Anyway, this is an interesting little problem. You need to generate an array of points along the path, and I assume you want them to be equally spaced. Generating this points isn’t trivial. Fortunately, Core Graphics … Read more

Drawing class drawing straight lines instead of curved lines

There are a few issues: You are using control points that are midpoints between the two points, resulting in line segments. You probably want to choose control points that smooth the curve. See http://spin.atomicobject.com/2014/05/28/ios-interpolating-points/. Here is a Swift 3 implementation of a simple smoothing algorithm, as well as Swift renditions of the above Hermite and … Read more

How to get a list of points from a UIBezierPath?

You might try this: UIBezierPath *yourPath; // Assume this has some points in it CGPath yourCGPath = yourPath.CGPath; NSMutableArray *bezierPoints = [NSMutableArray array]; CGPathApply(yourCGPath, bezierPoints, MyCGPathApplierFunc); The path applier function will be handed each of the path’s path elements in turn. Check out CGPathApplierFunction and CGPathApply. The path applier function might look something like this … Read more