开发者

Is there a way to get an easy overview of an NSArray?

开发者 https://www.devze.com 2022-12-16 15:58 出处:网络
I\'m getting an NSArray filled with something from a开发者_如何学编程 helper class. I have a small clue that it might contain NSDictionarys. But i\'m not sure. I tried to save the array to a plist but

I'm getting an NSArray filled with something from a开发者_如何学编程 helper class. I have a small clue that it might contain NSDictionarys. But i'm not sure. I tried to save the array to a plist but it didn't work because there is probably non plist objects in there.


You have a few options.

In the debugger you can put a breakpoint in right after it gets populated and type in po <variable name> in the gdb console. Or you can use the breakpoint and right click it in the variable listing and click "Print Description to Console".

Alternatively, you can use NSLog to display it's contents with a command similar to:

NSLog(@"%@", <variable name>);

All of these output it's contents in text form to the console, which is accessible via shift-cmd-R.


NSLog([anArray description])

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号