How do I find the length of an NSMutableArray?

Recommended Answers

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.