UIButton设置圆角,边框
不说废话,直接上demo:
UIButton *btn;
[btn.layer setMasksToBounds:YES];
[btn.layer setCornerRadius:10.0];//设置矩形四个圆角半径
[btn.layer setBorderWidth:1.0];//边框宽度
[btn.layer setBorderColor:[UIColor blackColor].CGColor];
不说废话,直接上demo:
UIButton *btn;
[btn.layer setMasksToBounds:YES];
[btn.layer setCornerRadius:10.0];//设置矩形四个圆角半径
[btn.layer setBorderWidth:1.0];//边框宽度
[btn.layer setBorderColor:[UIColor blackColor].CGColor];