title: Is IBDesignable broken for AppKit in Xcode 9.2 and Swift 4?
body: <p>Most questions, and answers related to this, are based on older versions of both Xcode and Swift. Additionally, 90 percent of the questions relate to UIKit and drawing custom controls.</p>
  
  <p>I am adding a standard button, that is centered inside a custom control, decorated with <code>IBDesignable</code>.</p>
  
  <pre><code>import Cocoa
  
  @IBDesignable public class ButtonPresetView: NSView {
      public override init(frame frameRect: NSRect) {
          super.init(frame: frameRect)
          initialControlSetup()
      }
  
      public required init?(coder decoder: NSCoder) {
          super.init(coder: decoder)
          initialControlSetup()
      }
  
      private func initialControlSetup() {
          let button = NSButton(title: "Hello", target: nil, action: nil)
          button.translatesAutoresizingMaskIntoConstraints = false
          addSubview(button)
  
          // Configure button
          centerXAnchor.constraint(equalTo: button.centerXAnchor).isActive = true
          centerYAnchor.constraint(equalTo: button.centerYAnchor).isActive = true
      }
  }
  </code></pre>
  
  <p>I add a custom view to the application and set the class property in the Identity Inspector to my custom class (<code>ButtonPresetView</code>).</p>
  
  <p>It should show the button centered on the canvas, but the canvas is blank.
  Not sure many people use it this way, but it worked gloriously with Swift 3 in Xcode 8.3.</p>
  
  <p>Does anyone else have this problem?</p>