Skip to content

Instantly share code, notes, and snippets.

@steipete
Created July 11, 2012 13:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steipete/3090279 to your computer and use it in GitHub Desktop.
Save steipete/3090279 to your computer and use it in GitHub Desktop.
Use subscripting with Xcode 4.4/iOS 4.3+
// Add support for subscripting to the iOS 5 SDK.
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
@interface NSObject (PSPDFSubscriptingSupport)
- (id)objectAtIndexedSubscript:(NSUInteger)idx;
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx;
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
- (id)objectForKeyedSubscript:(id)key;
@end
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment