sri
sri

Reputation: 3379

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?

Upvotes: 21

Views: 33429

Answers (1)

V1ru8
V1ru8

Reputation: 6147

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

Upvotes: 42

Related Questions