I’ve mentioned a number of projects that utilize UIBezierPath most recently KYCircularProgress which allows you to create custom progress indicators based on a UIBezierPath.
Something you might notice when working with UIBezierPath is that some operations can become extremely slow as the number of points on your path increase.
Here’s an open source library called PerformanceBezier from Adam Wulf that adds caching to UIBezierPath so that many common operations can be performed in constant time.
As the readme states:
For example, by default there is no O(1) way to retrieve elements from a UIBezierPath. In order to retrieve the first point of the curve, you must CGPathApply() and interate over the entire path to retrieve that single point. This framework changes that. For many algorithms, this can dramatically affect performance.
No changes are required beyond including the PerformanceBezier framework into your project as method swizzling is used.
You can find PerformanceBezier on Github here.
A nice library for enhancing UIBezierPath performance.
Original article: Open Source iOS Library That Adds Caching To UIBezierPath For Increased Performance
©2015 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.