UIView 设置圆角和边框备忘

//将图层的边框设置为圆角  
myWebView.layer.cornerRadius = "正方向视图边长的一半";

myWebView.layer.masksToBounds = YES; 
//给图层添加一个有色边框

 myWebView.layer.borderWidth = 2;

myWebView.layer.borderColor = [[UIColor colorWithRed:0.52 green:0.09 blue:0.07 alpha:1] CGColor];

你可能感兴趣的:(UIView)