Mark Szymanski
Mark Szymanski

Reputation: 58060

Number of objects in an NSArray

I was wondering if there was any possible way to get the number (count) of objects in an NSArray Object

Upvotes: 3

Views: 5330

Answers (2)

Alexsander Akers
Alexsander Akers

Reputation: 16024

Yes: int count = [array count];

Upvotes: 2

James Eichele
James Eichele

Reputation: 119144

You bet! From Apple's documentation:

NSUInteger numObjects = [myArray count];

Upvotes: 25

Related Questions