I'm using the following code to add a displayValue
method to NSObject:
@interface NSObject (MyNSObjectAdditions)
- (NSString*)displayValue;
@end
@implementation NSObject (MyNSObjectAdditions)
- (NSString*)displayValue {
return self.description;
}
@end
This works great, but really I'd rather have displayValue be a read-only property instead of a method.
What would be the proper syntax to convert displayValue
to be a property instead of a selector, if it's even possible?