UIButton *signBtn = [UIButton buttonWithType:UIButtonTypeCustom];
signBtn.frame = CGRectMake(0, 0, 40, 40);
[signBtn.layer setMasksToBounds:YES];
[signBtn.layer setCornerRadius:20.0]; //设置矩形四个圆角半径
[signBtn.layer setBorderWidth:1.0]; //边框宽度
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
signBtn.frame = CGRectMake(0, 0, 40, 40);
[signBtn.layer setMasksToBounds:YES];
[signBtn.layer setCornerRadius:20.0]; //设置矩形四个圆角半径
[signBtn.layer setBorderWidth:1.0]; //边框宽度
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 1, 0, 0, 1 });
[signBtn.layer setBorderColor:colorref];//边框颜色