// view为你要设置的视图
- (void) setRoundCorners:(UIView *)view borderColor:(CGColorRef)color borderWidth:(CGFloat)width cornerRadius:(CGFloat)radius
{
[[view layer] setBorderColor:color]; // 设置边框颜色
[[view layer] setBorderWidth:width]; // 设置边框宽度
[[view layer] setCornerRadius:radius]; // 设置圆角角度
}