2013-04-10 112 views
2

我想創建一個NSAlertbeginSheetModalForWindow,沒有任何圖標在alertstyle當中NSWarningAlertStyle,NSInformationalAlertStyle,NSCriticalAlertStyle如何在沒有任何圖標的情況下使用NSAlert?

此外,如果我使用的功能API如NSBeginAlertSheet,NSBeginCriticalAlertSheet,我該如何從中刪除圖標?

+3

有一種類似標準樣式的提醒用戶期望和用於..所以,而不是使用非標準的有趣的看空警告圖標,你可能會考慮擁抱平臺的標準行爲 – Jay 2013-04-10 12:27:23

回答

4

你可以做一些破解。

enter image description here

這裏,transparent image (click to download)使用。

+0

什麼是一個不錯的解決方案! +1 :) – duDE 2013-04-10 12:30:05

+2

你也可以做'alert.image = [NSImage新];' – 2015-06-12 02:18:10

+0

@ThePulsingEye,但仍然有空白的地方圖標應該顯示出來... – 2016-05-09 00:08:56

相關問題