ios中设置view的圆角角度

// 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]; // 设置圆角角度
}

猜你喜欢

转载自blog.csdn.net/luoyeguigen000/article/details/7210522
今日推荐