xib中button加边框
2017-05-27 本文已影响17人
陌上北辰
需要对CALayer写一个category
在.m 文件中实现方法
`
- (void)setBorderColorWithUIColor:(UIColor *)color
{
self.borderColor = color.CGColor;
}
在xib中做如下设置:
key path:layer.borderColorWithUIColor
type:color;
value:选自己需要的颜色

即可实现