suse
suse

Reputation: 10563

number of elements in NSMutableArray

How to know at runtime how many array elements are there in NSMutableArray?

Upvotes: 12

Views: 19188

Answers (2)

Jacob Relkin
Jacob Relkin

Reputation: 163228

NSArray (NSMutableArray is a subclass of NSArray) has a count method.

Example:

NSUInteger arrayLength = [myMutableArray count];

Upvotes: 29

willcodejavaforfood
willcodejavaforfood

Reputation: 44053

By reading the documentation for the class you are interested in.

Upvotes: -22

Related Questions