News for hackers. Stuff that matters.
Re:Xcode 4.4 adds support for Obj-C literals by BenjieGillam on Saturday August 18, 2012 @07:47AM (#4400896)
Apparently OSX 10.8 and iOS 6 bring support for subscripting to native NSArray/NSDictionary, but I think you can add subscripts to your own classes already just by implementing the following methods:

  -(id)objectAtIndexedSubscript:(NSUInteger)index;
  -(void)setObject:(id)object atIndexedSubscript:(NSUInteger)index;
as weiran has shown for NS(Mutable)Array/NS(Mutable)Dictionary.

There are no comments on this comment yet.