UIKitCategoryAdditions
UIKitCategoryAdditions copied to clipboard
Implement conditional ARC support
Also contains some fixes from other forks.
I would make three macro definitions for copy, release, autorelease ops and switch them to do nothing for ARC projects, instead of #if penetration all around the code. Too bad my current project still uses non-arc environment, so I don't have a chance to play with it. E.g.:
#if __has_feature(objc_arc)
#define MK_AUTORELEASE(x) (x)
#define MK_RELEASE(x) (x)
#define MK_COPY(x) (x)
#else
#define MK_AUTORELEASE(x) [x autorelease]
#define MK_RELEASE(x) [x release]
#define MK_COPY(x) [x copy]
#endif