Skip to content

Instantly share code, notes, and snippets.

@thechrisoshow
Created September 21, 2012 14:26
Show Gist options
  • Save thechrisoshow/3761746 to your computer and use it in GitHub Desktop.
Save thechrisoshow/3761746 to your computer and use it in GitHub Desktop.
New literal subscripting in objective c
NSArray *anArray = @[a,b,c];
NSDictionary *aDictionary @{ a : a1, b : b1};
// New subscripting format
anArray[0]; // => returns a
aDictionary[a] // => returns a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment