How to write proper description method to a class?
I have implemented
- (NSString *)description { NSString *descriptionString = [NSString stringWithFormat:@"Name: %@ \n Address: %@ \n", self.name, self.address]; return descriptionString; }
Evrey thing is fine if I call description on my object. But if I have an array of objects and I call description on it I get:
"Name: Alex \n Address: some address \n",
What I would like to get is
"Name: Alex
Address: some address"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With