Skip to content

Instantly share code, notes, and snippets.

@maojj
Created August 10, 2014 14:46
Show Gist options
  • Save maojj/e45665a541aa89cf6f2b to your computer and use it in GitHub Desktop.
Save maojj/e45665a541aa89cf6f2b to your computer and use it in GitHub Desktop.
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
@interface CALayer(XibConfiguration)
// This assigns a CGColor to borderColor.
@property(nonatomic, assign) UIColor* borderUIColor;
@end
#import "CALayer+XibConfiguration.h"
@implementation CALayer(XibConfiguration)
-(void)setBorderUIColor:(UIColor*)color
{
self.borderColor = color.CGColor;
}
-(UIColor*)borderUIColor
{
return [UIColor colorWithCGColor:self.borderColor];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment