super
is a way to send a message to yourself and invoke the superclass's implementation rather than your own. It's not a separate object.
NSLog
takes an object as the parameter to %@
, and the object you mean to pass here is yourself.
Frankly, I'm surprised the code in question even compiles.
If you want to log your superclass's description of yourself rather than your own, then, as Alex Reynolds says, you must use a [super description]
message for the parameter to NSLog
. This sends the description
message to yourself using your superclass's implementation, and passes the object that that message returns (the NSString object that is your superclass's description of yourself) as the parameter to NSLog
.
But that's probably not necessary. If you have overridden description
, that implementation can send [super description]
and integrate that string* into the description string that it creates and returns. If you haven't overridden description
, then a description
message to self
will hit the superclass's implementation anyway. Either way, pass self
, not super
, to your NSLog
statements.
*There are several ways you could integrate the one string into the other; see the NSString docs for more details.