How to Print out(NSLog) the properties of a custom object added to a NSMutableArray

后端 未结 4 1014
孤独总比滥情好
孤独总比滥情好 2020-12-11 15:43

I have a custom object that I create with 3 properties defined in it. I create the object and assign the values to those properties. After that I put that object into an

4条回答
  •  無奈伤痛
    2020-12-11 16:25

    There is a simple way than using description method in all classes.

    Use ICHObjectPrinter:

    NSLog(@"Object description is %@",[ICHObjectPrinter descriptionForObject:person]);
    

    https://github.com/arundevma/ICHObjectPrinter

提交回复
热议问题