Digital Media Mac Blogs > Mac

iPhone: Uncovering unimplemented selectors at runtime


Given that the iPhone is all but undocumented at the moment with the SDK not promised until February, I find that it often helps to add the following code to my classes. It allows me to see what methods are being invoked and create those as needed.

// Peekaboo. Uncomment to reveal selectors during runtime
-(BOOL) respondsToSelector:(SEL)aSelector {
printf("SELECTOR: %s\n",
[NSStringFromSelector(aSelector) UTF8String]);
return [super respondsToSelector:aSelector];
}

Categories





AddThis Social Bookmark Button
Comments (0)
Read More Entries by Erica Sadun.

Leave a comment


Recommended for You

Topics of Interest

Archives


 
 


Or, visit our complete archive.