title: How to remove right and left borders in UIButton?
body: <p>I am using Swift 2.3 now. I've added borders to the button with this code:</p>
  
  <pre><code>self.history.layer.borderWidth = 1
  self.history.layer.borderColor = UIColor.mainColor().CGColor
  </code></pre>
  
  <p>And as a result I got:
  <a href="https://i.stack.imgur.com/thXKy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/thXKy.png" alt="History button borders"></a></p>
  
  <p>Now, I need to remove left and right borders and have only top and bottom borders left. How can I manage it?</p>
  
  <p>Additions: thnx to @Teja, I've seen another question <a href="https://stackoverflow.com/questions/7022656/calayer-add-a-border-only-at-one-side">CALayer: add a border only at one side</a>
  But, the thing is I need bottom and top. However, after adding -1, -1 CALayer only the bottom one has been added.</p>