提供一个UIView设置指定角为圆角的代码,可以在按钮上试试,如果不行的话可以考虑将按钮换成UIView,给UIView加个单击手势,希望对你有帮助!
UIView *whiteView = [[UIView alloc] initWithFrame:CGRectMake(30, CGRectGetMaxY(pickerView.frame), With-60, 50)];
whiteView.backgroundColor = [UIColor whiteColor];
UIBezierPath *maskPath1 = [UIBezierPath bezierPathWithRoundedRect:whiteView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer1 = [[CAShapeLayer alloc] init];
maskLayer1.frame = whiteView.bounds;
maskLayer1.path = maskPath1.CGPath;
whiteView.layer.mask = maskLayer1;
UIView *whiteView = [[UIView alloc] initWithFrame:CGRectMake(30, CGRectGetMaxY(pickerView.frame), With-60, 50)];
whiteView.backgroundColor = [UIColor whiteColor];
UIBezierPath *maskPath1 = [UIBezierPath bezierPathWithRoundedRect:whiteView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer1 = [[CAShapeLayer alloc] init];
maskLayer1.frame = whiteView.bounds;
maskLayer1.path = maskPath1.CGPath;
whiteView.layer.mask = maskLayer1;