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

Chapter 9 __block correction

Chapter 9 indicates that you should use a special __block copy of self to avoid retain loops. Under ARC, you need to add __weak (or at least __unsafe_unretained) copy of self.

Read More

MKNetworkKit

The original author of ASIHttpRequest, Ben Copsey has officially stopped supporting it. Most of the example from Chapters 10: REST for the Weary and Chapter  17: Going offline in the book iOS5:PTL would work the same when replaced with MKNetworkKit. I wrote MKNetworkKit so that it would be super easy for developers to migrate from ASIHttpRequest. It’s feature rich, ARC only code based on...

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

New name for NSAttributedString-Additions-for-HTML

The framework NSAttributedString-Additions-for-HTML discussed in Chapter 18 has been renamed and the site has been moved. Its new name is DTCoreText and its new GitHub location is https://github.com/Cocoanetics/DTCoreText.

Read More