The description method   Leave a comment

Any object can implement the description method that is used to return a description of the contents of a receiver. The problem i have always found with this method. Is keeping the method up to date during the development process. Also getting other developers working on the project also keeping it up to date.

With that problem in mind I put together this method that will automatically generate the string and list all available properties in the the receiver. It will print out when the instance is used in NSLog or or printed using the GDB debugger commands in my previous post.

You can also find it on my custom xCode 4 templates here on github. Right at the bottom the class.

Posted October 11, 2011 by abe in iOS, iPhone, Mac + OSX, Obj-c, Objective-C, xCode

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">