title: How to use UIButton with Custom Class?
body: <p>I'm currently working on an Application and my custom class doesn't seem to reflect on the UIButton even though I could select the class "RoundedButton". Here is the screenshot of my application:</p>
  
  <p><a href="https://i.stack.imgur.com/JRLwA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JRLwA.png" alt="Appscreenshot"></a>
  here is the screenshot of the class name setting:</p>
  
  <p><a href="https://i.stack.imgur.com/UNiXx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UNiXx.png" alt="class name setting"></a></p>
  
  <p>and here is my code for the custom class:</p>
  
  <pre><code>class RoundedButton: UIButton {
      override func layoutSubviews() {
          super.layoutSubviews()
          let radius: CGFloat = self.bounds.size.height / 10.0
          self.layer.cornerRadius = radius
          self.clipsToBounds = true
      }
  }
  </code></pre>
  
  <p>I've sifted through other sites but I can't seem to get it to work. </p>