类似于java的toString()
|
1
2
3
4
5 |
- (NSString
*)description{ // 包含对象类型名称,以及对象的指针地址 return
[NSString
stringWithFormat:@"<%@: %p> {answer: %@, title: %@, icon: %@, options: %@}", [self
class], self, self.answer, self.title, self.icon, self.options];} |
02重写description方法,跟踪对象的明细信息,布布扣,bubuko.com
原文:http://www.cnblogs.com/coco-bao9107/p/3751924.html