Label
xib-based
Adding Label control to xib interface, change Label 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 label: HDLabel = {
let label = HDLabel(frame: NSRect(x: 100, y: 100, width: 68, height: 13))
return label
}()
override func viewDidLoad() {
super.viewDidLoad()
label.stringValue = "macOSDeveloper"
self.view.addSubview(label)
}
}