2016-07-29 7 views
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에서 아무 것도 찾을 수 없습니다. 어떤 도움을 주시면 감사하겠습니다!

+2

NSAlert의 문서는 영어로되어 있습니다. 읽으려고 했습니까? 'messageText'를 보았습니까? – Willeke

+0

실제로 미리 정의 된 글꼴 크기를 사용하는 것이 아니라 글꼴 크기를 설정하고 싶었습니다. 나는 영어를 읽을 수 있지만, 그 일을 할 수있는 것을 찾을 수 없었다. :-) – cheesydoritosandkale

답변

1

informativeText을 설정하지 마십시오. 실제로는 작습니다.

대신 messageText을 설정하십시오. 그것은 훨씬 더 크고 대담합니다.

둘 다 설정하면 더 중요한 정보가 크고 굵고 중요도가 낮은 정보는 작습니다.

myPopup.messageText = "Sorry, we weren't able to that." 
myPopup.informativeText = "Please Call Support 1(800)234-4567 ext: 12345"