public
Created

UIColor+CFAdditions Category to handle UIColor.CGColor in ARC

  • Download Gist
UIColor+CFAdditions.h
Objective-C
1 2 3 4 5 6 7
#import <UIKit/UIKit.h>
 
@interface UIColor (CFAdditions)
 
- (CGColorRef)CGColorRetained;
 
@end
UIColor+CFAdditions.m
Objective-C
1 2 3 4 5 6 7 8 9 10
#import "UIColor+CFAdditions.h"
 
@implementation UIColor (CFAdditions)
 
- (CGColorRef)CGColorRetained
{
return CGColorRetain(self.CGColor);
}
 
@end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.