Jan 6, 2013

Workhorses

Over the years I have built up a decent library of categories on Apple’s frameworks. But, there are two that I use over and over: a check for a nil or empty NSString, and a convenience for NSArray that checks the length and returns the first element or nil.

Just a few lines of code, but so convenient that most of the time I forget they’re not actually in Foundation.

reblog