title: IBDesignable Subclass of TextField renders to IB but not to simulator / device
body: <p>I created a subclass of UITextField that adds a floating button to the right hand side of the text-field. It's all good in the IB, but for some reason the button image does not show up in the simulator or on the device. </p>
  
  <p>Using the view debugger,  I can see the button is there, right where it is supposed to be. I can even tap it and get the target action to trigger. However, the image is not visible on the screen.</p>
  
  <p>I tried messing with the clipsToBounds properties of both the TextView and the button to no avail.</p>
  
  <p>I also know the image asset is working, because I made an an image view and set the image to the same image asset, and it appears just fine. The class for the TextField is below:</p>
  
  <pre><code>@IBDesignable
  class ButtonedTextField: UITextField {
  
      @IBInspectable var buttonImage: UIImage?
      var button: UIButton?
      var buttonAction: (() -&gt; ())?
  
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          configure()
      }
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          configure()
      }
  
      override func prepareForInterfaceBuilder() {
          super.prepareForInterfaceBuilder()
          configure()
      }
  
      @objc private func buttonActionWrap() {
          buttonAction?()
      }
  
      private func configure() {
          let button = UIButton(type: .custom)
          button.addTarget(self, action: #selector(buttonActionWrap), for: .touchUpInside)
          let height = self.frame.height
          let buttonHeight = height - 10
          button.frame = CGRect(x: self.frame.width - (buttonHeight + 10), y: 5, width: buttonHeight, height: buttonHeight)
          button.setImage(buttonImage, for: .normal)
          self.button = button
          self.addSubview(button)
          bringSubview(toFront: button)
      }
  }
  </code></pre>
  
  <p>Any thoughts? </p>