title: CALayer: add a border only at one side
body: <p>I can add a border to a CALayer in this way:</p>
  
  <pre><code>[webView.layer setBorderColor: [[UIColor colorWithRed:0.6 green:0.7 blue:0.2 alpha:1] CGColor]];
  [webView.layer setBorderWidth: 2.75];   
  </code></pre>
  
  <p>But is it possible to add a border only at one side? I only need a border at the bottom. Or can I reach this with other properties, e.g. frame, bounds, mask, ...?</p>
  
  <p><img src="https://i.stack.imgur.com/zn3eu.jpg" alt="enter image description here"></p>
  
  <p>Thanks for your help!</p>
  
  <hr>
  
  <p>@Control-V</p>
  
  <pre><code>        UIWebView *webView = [[UIWebView alloc] init];
          CALayer *webViewLayer = webView.layer;
  
          // now you can do a lot of stuff like borders:
          [webViewLayer setBorderColor: [[UIColor greenColor] CGColor]];
          [webViewLayer setBorderWidth: 2.75];    
  </code></pre>
  
  <p>Have a look at the CALayer documentation:
  <a href="https://developer.apple.com/documentation/quartzcore/calayer" rel="noreferrer">https://developer.apple.com/documentation/quartzcore/calayer</a></p>
  
  <p>And have a look here:
  <a href="http://iosdevelopertips.com/cocoa/add-rounded-corners-and-border-to-uiwebview.html" rel="noreferrer">http://iosdevelopertips.com/cocoa/add-rounded-corners-and-border-to-uiwebview.html</a></p>