In android I can Log("aa",""+Object),then the object can as string to print,it can help me understand the object and if object is int type, I am not to converter,so I want to do as the same as in iOS. for example: I want to print the id type as string at iOS as follows:
NSLog(@"#### %s",[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 5)]);
I want to print the return value of [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 5)] as string so that I can understand the indexSetWithIndexesInRange method.
Try using
%@, that’s the format that printsNSObject‘sdescription(cocoa’s analog to Java’stoString).