UIButton设置圆角,边框

不说废话,直接上demo:

UIButton *btn;  

[btn.layer setMasksToBounds:YES];  

[btn.layer setCornerRadius:10.0];//设置矩形四个圆角半径

[btn.layer setBorderWidth:1.0];//边框宽度 

[btn.layer setBorderColor:[UIColor blackColor].CGColor];

posted @ 2015-11-04 15:14  老茶叶  阅读(87)  评论(0)    收藏  举报