21

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

1

1 Answer 1

42
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

Sign up to request clarification or add additional context in comments.

2 Comments

And the description method of each object in it.
Note that the description is intended for debugging use only. Don't use it as something you want to store and parse later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.