By bloid
via noodlesoft.com
Published: Jul 03 2009 / 02:37
Some time ago, Guy English posted a great and twisted article on key value coding (KVC). He comes up with a nice hack to do stuff with KVC that was never intended. Of course, there are some neat ways you can use KVC without indulging in the craziness that Guy English delves into (and I think he’d be the first to admit that it’s not meant for primetime). The main point remains, which is that using KVC with NSArrays is a great way to avoid coding loops over their contents. You have an array of “Person” objects and want an array of their names (accessible via a -name method)? Just do…
Tweet
SaveShareSend
Tags: apple, frameworks, other languages
Comments
Voters For This Link (5)
Voters Against This Link (1)