Headers to provide subscripting support. The implementations are provided by libarclite.
This is an interim solution to subscripting; it will almost certainly not be necessary when the iOS 6 SDK is released (even for building to iOS 5).
- Foundation+sdfsubscripts.h: The header file that adds subscripting support to
- NSUserDefaults+sdfextrasubs.h and NSUserDefaults+sdfextrasubs.m: A demonstration of how to patch an existing class to support subscripts.
- Add Foundation+sdfsubscripts.h to your project.
#import "Foundation+sdfsubscripts.h"Ideally, from your prefix.
- Examine the technique used in NSUserDefaults+sdfextrasubs.h and NSUserDefaults+sdfextrasubs.m. You probably don't want to use this file directly, however.
For this? Free and public domain. Do whatever you want with it. Enjoy.
- Add support for any other classes swizzled by libarclite to Foundation+sdfsubscripts.h. I don't have a list, so there may be others.
- Add a more useful swizzling category.