Category Pros and Cons

A great primer into Objective-C categories by Mark Dalrymple for The Big Nerd Ranch:

Objective-C categories are cool. They allow you do something that you can’t do in most compiled languages: add new methods to existing classes. You can even add methods to classes that you didn’t write.

Suppose you wrote some code to translate an ordinary string, like “Hello, perhaps I could enjoy a bit of your delicious sandwich over there?” to LOLcat speak, like “I can has cheezburger?”

Posted on March 2, 2012, in Programming. Bookmark the permalink. Comments Off on Category Pros and Cons.

Comments are closed.