How do I find the length of an NSMutableArray?

Recommended Answers

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, networking, learning, and sharing knowledge.