Skip to content

Instantly share code, notes, and snippets.

@jernejstrasner
Created August 11, 2012 14:47
Show Gist options
  • Save jernejstrasner/3325017 to your computer and use it in GitHub Desktop.
Save jernejstrasner/3325017 to your computer and use it in GitHub Desktop.
Enable subscripting support in the iOS 5.0 SDK
//
// JSSubscriptingSupport.h
// JernejStrasner
//
// Created by Jernej Strasner on 7/27/12.
// Copyright (c) 2012 JernejStrasner.com. All rights reserved.
//
// Subscripting support for iOS SDK 5.0
//
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
@interface NSArray (JSSubscriptingSupport)
- (id)objectAtIndexedSubscript:(NSUInteger)idx;
@end
@interface NSMutableArray (JSSubscriptingSupport)
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx;
@end
@interface NSDictionary (JSSubscriptingSupport)
- (id)objectForKeyedSubscript:(id)key;
@end
@interface NSMutableDictionary (JSSubscriptingSupport)
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
@end
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment