It seems the default appearance of an NSAlert is less than ideal. For example when I click a checkbox, the checkbox disappears, and the focused button has white text.
[Edit] I should mention that this is a Metal app.
Here is the code for creating the NSAlert (using SnapKit for constraints):
let aview = NSView(frame: NSRect(x: 0, y: 0, width: 150, height: 70))
let btn = NSButton(checkboxWithTitle: "Sound", target: nil, action: nil)
let btn1 = NSButton(checkboxWithTitle: "Music", target: self, action: #selector(handleMusicToggle(_:)))
aview.addSubview(btn)
aview.addSubview(btn1)
btn.snp.makeConstraints { (make) in
make.leading.equalToSuperview()
make.top.bottom.equalToSuperview()
}
btn1.snp.makeConstraints { (make) in
make.leading.equalTo(btn.snp.trailing)
make.trailing.equalToSuperview()
make.top.bottom.equalToSuperview()
}
let alert = NSAlert()
alert.messageText = "PAUSED"
alert.informativeText = "BLOKKIT is paused"
alert.alertStyle = .warning
alert.accessoryView = aview
alert.addButton(withTitle: "RESUME")
alert.addButton(withTitle: "QUIT")
let response = alert.runModal()