How to know at runtime how many array elements are there in NSMutableArray?
+2
A:
NSArray
(NSMutableArray
is a subclass of NSArray
) has a count
method.
Example:
NSUInteger arrayLength = [ myMutableArray count ];
Jacob Relkin
2010-02-26 09:49:50
ok .. thanks.. can i access the names of elements ?? do we have any method to access the names at index?
suse
2010-02-26 10:12:02
names as in keys? you'll need to use an `NSDictionary` for non-numeric indexes.
Jacob Relkin
2010-02-26 15:25:11
A:
By reading the documentation for the class you are interested in.
willcodejavaforfood
2010-02-26 10:00:26