sreejith.virgo sreejith.virgo -4 years ago 156
iOS Question

acess element of NSArray with its index

Is it possible to access elements of an

NSArray
based on index and use them for comparison/operations?

Just like
arrayName[ith element]
in C/C++

Answer Source

Yes , you can access elements of an NSArray based on index .

NSArray *a=@[@"s1",@"s2",@"s3"];
NSLog(@"%@",a[1]);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download