0

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)
 }

これは私の現在のコードで問題なく動作しますが、OS X アプリケーションを iMac で実行すると、テキストが非常に小さく見えます。プログラムでポイントサイズを増やしたいと思っていましたが、Swiftでは何も見つかりません。どんな助けでも大歓迎です!

4

2 に答える 2

1

設定しないでください。これinformativeTextは本当に小さいです。

代わりに、 を設定しmessageTextます。それははるかに大きく、大胆です。

さらに良いのは、両方を設定して、重要度の高い情報を大きく太字にし、重要度の低い情報を小さく設定することです。

myPopup.messageText = "Sorry, we weren't able to that."
myPopup.informativeText = "Please Call Support 1(800)234-4567 ext: 12345"
于 2016-07-29T15:54:52.643 に答える