Modern Objective-C contains subscripting support. Instead of writing:
1 |
NSString *value = [dict objectForKey: @"Key"]; |
You can now write:
1 |
NSString *value = dict[@"Key"]; |
Unfortunately, this requires SDK support. While the OS X SDK provides this support, the iOS 5 SDK one doesn’t. I’m going to show you how to add it.