Even Faster Bezier

At Cocoaphony, I’ve been investigating how to speed up the calculation of Bézier curves, like the ones discussed in Chapter 18. In this next installment, learn how to dramatically improve performance by refactoring the math. This way of thinking is important to many optimization problems, and particularly tight inner loops like you find in computationally hard problems. Read more at Cocoaphony.

Read More

Introduction to Fast Bezier (and trying the Accelerate.framework)

So you want to hand-calculate Bézier curves. Good for you. It comes up more often then you’d think on iOS, even though UIBezierPath is supposed to do it all for you. The truth is, sometimes you need the numbers yourself. For instance if you want to calculate intersections, or you want to draw text along the curve (like in CurvyText from chapter 18).

Read More

Drop-in offline caching for UIWebView (and NSURLProtocol)

Your programs need to deal gracefully with being offline. Mugunth Kumar has built an excellent toolkit that manages REST connections while offline called MKNetworkKit, and Chapter 17 of iOS:PTL is devoted to the ins-and-outs of this subject. But sometimes you just have a simple UIWebView, and you want to cache the last version of the page.

Read More