释放双眼,带上耳机,听听看~!
iOS之给button加边框 . 圆角弧度 . 加阴影
UIButton *button = [UIButton alloc] initWithFrame:CGRect(100, 100, 100 , 100)];
//设置边框颜色
button.layer.borderColor = [[UIColor redColor] CGColor];
//设置边框宽度
button.layer.borderWidth = 1.0f;
//给按钮设置角的弧度
button.layer.cornerRadius = 4.0f;
//设置背景颜色
button.backgroundColor = [UIColor redColor];
button.layer.masksToBounds = YES;