How do I find the length of an NSMutableArray?

Recommended Answers

Answered by Moschops 683 in a post from

The class method count.

Jump to Post

All 2 Replies

The class method count.

Not to be overly picky but count is not a class method.
NSMutableArray *mArray = [NSMutableArray array];
NSNumber *mArraySize = [NSNumber numberWithInt:[mArray count]]; //or mArray.count also returns the int

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.