The default description for a class instance returns "ClassName: 0x105120". How might I modify the method below to just return the "ClassName"?
// The code below just returns the address ...
- (NSString *)description {
NSString *result;
result = [NSString stringWithFormat:@"%p", self];
return result;
}
EDIT: in that case would this be correct? Although I do understand that if I want to actually get the className as an NSString I should use NSStringFromClass([self class])
- (id)init {
NSLog(@"_init: %@", [self class]);
[super init];
return self;
}
thanks in advance -gary-