Friday, October 9, 2009 [Tweets] [Favorites]

Safe Key-Value-Coding

M. Uli Kusterer suggests using:

#if DEBUG
#define PROPERTY(propName)    NSStringFromSelector(@selector(propName))
#else
#define PROPERTY(propName)    @#propName
#endif

to define symbolic constants for keys so that the compiler will give you Undeclared Selector warnings.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment