Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source iOS Library That Adds Caching To UIBezierPath For Increased Performance

  •  
  •  
  •  
  •  
  •  

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments