Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print array in objective-c?

I need to check my values from NSArray which are stored dynamically. How should I print the array values in Objective-C?

like image 946
sri Avatar asked Aug 03 '10 12:08

sri


1 Answers

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

like image 162
V1ru8 Avatar answered Oct 21 '22 11:10

V1ru8