This code dramatically improves performance for common UIBezierPath operations, and it also brings UIBezierPath API closer to its NSBezierPath counterpart.
This framework adds caching into every UIBezierPath so that common operations can be performed in constant time. It also adds some missing NSBezierPath methods to the UIBezierPath class.
After linking this framework into your project, all Bezier paths will automatically be upgraded to use this new caching. No custom UIBezierPath allocation or initialization is required.
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.
View the header files for full documentation.
This library depends on IOS-Universal-Framework and is built with the Real Framework option.
- Link against the built framework.
- Add "-ObjC++ -lstdc++" to the Other Linker Flags in the project's Settings
- #import <PerformanceBezier/PerformanceBezier.h>
This framework includes and uses the JRSwizzle library, which is licensed under the MIT license.
This work is licensed under a Creative Commons Attribution 3.0 United States License.
For attribution, please include:
- Mention original author "Adam Wulf for Loose Leaf app"
- Link to https://getlooseleaf.com/opensource/
- Link to https://github.com/adamwulf/PerformanceBezier
This framework is created by Adam Wulf (@adamwulf) as a part of the Loose Leaf app.
Buy the app to show your support! :)