.h文件
#import <QuartzCore/QuartzCore.h>
@interface CALayer (MaxMethod)
- (void)setBorderColorFromUIColor:(UIColor *)color;
@end
.m文件
#import "CALayer+MaxMethod.h"
@implementation CALayer (MaxMethod)
- (void)setBorderColorFromUIColor:(UIColor *)color {
self.borderColor = color.CGColor;
}
@end