title: Broken corners of UITextfield when custom masking is applied
body: <p>I am trying to create a textfield with left corners rounded off. For that I've used the following code to apply masking. Now the corners of the textfield are trimmed off. Any idea why?</p>
  
  <pre><code>    let shape = CAShapeLayer()
      shape.bounds = textfieldContainerView.frame
      shape.position = textfieldContainerView.center
      shape.path = UIBezierPath(roundedRect: textfieldContainerView.bounds,
                                byRoundingCorners: [.topLeft, .bottomLeft],
                                cornerRadii: CGSize(width: 5, height: 5)).cgPath
      textfieldContainerView.layer.mask = shape
      textfieldContainerView.layer.borderColor = ColorKit.smoke.cgColor
      textfieldContainerView.layer.borderWidth = 2.0
  </code></pre>
  
  <p>Here's how it looks like (notice the broken corners on the left).</p>
  
  <p><a href="https://i.stack.imgur.com/XCjUY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCjUY.png" alt="enter image description here"></a></p>