设置NSAlert窗口的宽度

时间:2017-08-24 11:13:00

标签: swift macos cocoa nsalert

我使用此代码显示nsalert消息:

let alert = NSAlert()
alert.informativeText = "My Text"
alert.addButton(withTitle: "Button 1")
alert.addButton(withTitle: "Button 2")
alert.runModal()

有没有办法设置警报窗口的宽度值?

0 个答案:

没有答案