Check Box

xib-based

Adding Check Box Button control to xib interface, change control 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 checkBox: HDCheckBox = {
        let checkBox = HDCheckBox(frame: NSRect(x: 100, y: 100, width: 60, height: 40))
        return checkBox
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.addSubview(checkBox)
    }
}