iOS开发_设置按钮单边边框
[_btn1.layersetMasksToBounds:YES];
// 设置矩圆角半径
[_btn1.layersetCornerRadius:3.0];
// 边框宽度
[_btn1.layersetBorderWidth:1.0];
// 单边边框(右边)
CALayer *deleteBtnBorder = [CALayer layer];
float height = self.deleteBtn.height;
float width = self.deleteBtn.width;
deleteBtnBorder.frame = CGRectMake(width, 0, 1, height);
deleteBtnBorder.backgroundColor = [UIColor redColor].CGColor;
[self.deleteBtn.layer addSublayer:deleteBtnBorder];