objective c - NSLog and printing of an object -
I have a class and I want to set up to call that NSLog with that class. For example,
NSLog (@ "% @", non-standard object);
How do I set up an object, so what does it want me to print?
-description
override the method. It does not take any parameters and returns a NSString
which turns out to be printf
'd.
-debugDescription
is another version (Return NSString
, no parameter) that do po'ing the object from gdb.
Comments
Post a Comment