Created
August 10, 2014 14:46
-
-
Save maojj/e45665a541aa89cf6f2b to your computer and use it in GitHub Desktop.
set bordercolor in storyboard, See: https://github.com/ConventionalC/ConventionalC/blob/develop/ios/CALayer+XibConfiguration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <QuartzCore/QuartzCore.h> | |
#import <UIKit/UIKit.h> | |
@interface CALayer(XibConfiguration) | |
// This assigns a CGColor to borderColor. | |
@property(nonatomic, assign) UIColor* borderUIColor; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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