Your understanding is completely correct; you're just missing one bit of syntax. Subscripted access of NSArray
s with the array[index]
form is part of the "collection literals" feature introduced by Clang a little while back.
It's transformed by the compiler into a call to [array objectAtIndexedSubscript:index]
.