iOS 创建一个内外角都有弧度的圆角button
- 作者: 就是看到搞笑图片就想和你们分享
- 来源: 51数据库
- 2022-08-17
UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(2, 2, 100, 100)];
btn.backgroundColor = [UIColor redColor];
btn.layer.cornerRadius = 3;
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(99, 99, 104, 104)];
view.backgroundColor = [UIColor blueColor];
view.layer.cornerRadius = 3;
[self.view addSubview:view];
[view addSubview:btn];
推荐阅读
