I need to check my values from NSArray
which are stored dynamically. How should I print the array values in Objective-C?
Asked
Active
Viewed 3.3k times
20
-
See http://stackoverflow.com/questions/992901/how-do-i-iterate-over-an-nsarray – Dariusz Woźniak Aug 03 '10 at 12:20
1 Answers
41
NSLog(@"%@",yourArray);
This actually calls the description method of your NSArray and prints it to the log. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/description

V1ru8
- 6,139
- 4
- 30
- 46
-
1
-
Note that the `description` is intended for debugging use only. Don't use it as something you want to store and parse later. – bbum Aug 03 '10 at 15:33