0
我似乎无法增加NSAlert的字体大小 - 甚至整个框的大小。以编程方式增加NSAlert的字体大小
else if array[arraycount].containsString("Error: error.") {
let myPopup: NSAlert = NSAlert()
myPopup.alertStyle = NSAlertStyle.WarningAlertStyle
myPopup.addButtonWithTitle("I've Called!")
myPopup.informativeText = "Sorry, we weren't able to that. Please Call Support 1(800)234-4567 ext: 12345"
myPopup.runModal()
let app = NSRunningApplication.currentApplication()
app.activateWithOptions(.ActivateIgnoringOtherApps)
}
这是我当前的代码工作正常,但我会在iMac上运行我的OS X应用程序和文字看起来真的很小。我希望以编程方式增加磅值,但在Swift中我找不到它。任何帮助,将不胜感激!
NSAlert的文档是英文的,您是否尝试阅读它?你有没有看到'messageText'? – Willeke
我实际上想设置我的字体大小,而不仅仅是使用预定义的字体。尽管我可以阅读英文,但我无法找到任何可以做到的事情。 :-) – cheesydoritosandkale