Search code examples
iosobjective-cnsarray

How to count the number of items in a NSArray?


I want to count the number of items in a NSArray and perform some operation based on that. I know it's not a big deal but I couldn't get it.

Please give some suggestions.


Solution

  • That's really simple:

    int arrayLength = array.count;