答案 0 :(得分:1)
_btn1 = [[UIButton alloc] initWithFrame:CGRectMake(50, 1500, 100, 200)];
_btn1.layer.cornerRadius = 5;
_btn1.layer.masksToBounds = YES;
[_btn1 setBackgroundImage:[UIImage imageNamed:@"img2.jpg"] forState:UIControlStateNormal];
如果您想自己绘制图层,可以查看MAConfirmButton