Skip to content

Instantly share code, notes, and snippets.

@XMLSDK
Created March 6, 2012 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XMLSDK/1983329 to your computer and use it in GitHub Desktop.
Save XMLSDK/1983329 to your computer and use it in GitHub Desktop.
UIColor+CFAdditions Category to handle UIColor.CGColor in ARC
#import <UIKit/UIKit.h>
@interface UIColor (CFAdditions)
- (CGColorRef)CGColorRetained;
@end
#import "UIColor+CFAdditions.h"
@implementation UIColor (CFAdditions)
- (CGColorRef)CGColorRetained
{
return CGColorRetain(self.CGColor);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment