Howdy howdy, NSHipsters!
If you alloc init
an NSCalendar
, you'll notice that New Year's Eve falls on a Monday this year, a.k.a. "the day NSHipster is published every week". What fun!
So in celebration of the upcoming year++
, I thought it'd be fun to compile a list of some of your favorite tips and tricks of the trade. Submit your favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!
Here are a few examples of the kind of things I'd like to see:
- StaticObjcMethods from [Apple]((http://developer.apple.com/library/mac/#samplecode/CocoaTipsAndTricks/Introduction/Intro.html): Demonstrates how to use static Objective-C methods that have access to ivars.
- NSArray Slicing from Mike Ash: A sugary syntax for slicing array, with a clever use of subscripting.
- Texts From Xcode: Absolutely brilliant--makes me laugh every time. A must-follow on Twitter or Tumblr.
Again, just comment on this Gist below with your submission.
Can't wait to see what y'all come up with!
Using
NSPropertyListSerialization
to implement base64 encoding and decoding in less than 50 lines with support for iOS 2.0 and OS X 10.5.