Image View

xib-based

Adding NSImageView control to xib interface, change NSImageView custom class to component class name of your exported.

code-based

Declare lazy load variable in the controller class and add it to the view.

import Cocoa

class ViewController: NSViewController {
    lazy var imageView: HDImageView = {
        let imageView = HDImageView(frame: NSRect(x: 100, y: 100, width: 60, height: 60))
        return imageView
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.addSubview(imageView)
    }
    
}