title: IBDesignable Build Failed
body: <p>I have Created <code>IBDesignable</code> and <code>IBInspectable</code> custom class to give shadow and corner radius for view</p>
  
  <p>But When I assign <code>Designable</code> class to <code>view</code>, I get Designable Build Failed</p>
  
  <p>This is my code </p>
  
  <pre><code>import Foundation
  
  import UIKit
  
  @IBDesignable
  class DesignableView: UIView {
  }
  
  @IBDesignable
  class DesignableButton: UIButton {
  }
  
  @IBDesignable
  class DesignableLabel: UILabel {
  }
  
  @IBDesignable
  class DesignableTableView: UITableView {
  
  }
  
  extension UIView {
  
      @IBInspectable
      var cornerRadius: CGFloat {
          get {
              return layer.cornerRadius
          }
          set {
              layer.cornerRadius = newValue
          }
      }
  
      @IBInspectable
      var borderWidth: CGFloat {
          get {
              return layer.borderWidth
          }
          set {
              layer.borderWidth = newValue
          }
      }
  
      @IBInspectable
      var borderColor: UIColor? {
          get {
              if let color = layer.borderColor {
                  return UIColor(cgColor: color)
              }
              return nil
          }
          set {
              if let color = newValue {
                  layer.borderColor = color.cgColor
              } else {
                  layer.borderColor = nil
              }
          }
      }
  
      @IBInspectable
      var shadowRadius: CGFloat {
          get {
              return layer.shadowRadius
          }
          set {
              layer.shadowRadius = newValue
          }
      }
  
      @IBInspectable
      var shadowOpacity: Float {
          get {
              return layer.shadowOpacity
          }
          set {
              layer.shadowOpacity = newValue
          }
      }
  
      @IBInspectable
      var shadowOffset: CGSize {
          get {
              return layer.shadowOffset
          }
          set {
              layer.shadowOffset = newValue
          }
      }
  
      @IBInspectable
      var shadowColor: UIColor? {
          get {
              if let color = layer.shadowColor {
                  return UIColor(cgColor: color)
              }
              return nil
          }
          set {
              if let color = newValue {
                  layer.shadowColor = color.cgColor
              } else {
                  layer.shadowColor = nil
              }
          }
      }
  }
  </code></pre>
  
  <p>This is what I got </p>
  
  <p><a href="https://i.stack.imgur.com/LeXPP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LeXPP.png" alt="error"></a></p>