UIView如何设置圆角

1.以下的代码:

  1. //将图层的边框设置为圆脚
  
  2. myWebView.layer.cornerRadius = 8;
   
  3. myWebView.layer.masksToBounds = YES;  
  4. //给图层添加一个有色边框
         
  5.  myWebView.layer.borderWidth = 5;
          
  6. myWebView.layer.borderColor = [[UIColor colorWithRed:0.52 green:0.09 blue:0.07 alpha:1] CGColor];
    
  7. }  
原文地址:https://www.cnblogs.com/zhufeng1994/p/4632844.html