Creating a fully customized NSAlert
问题 Is it possible to create a fully customized alert? I'm doing it with custom sheets now, but I'd like to have the feature that the sheet is blocking (like -[NSAlert runModal] ). I just want to change the background, really, and the text color, of course. 回答1: Warning about the recommended solution: This code causes wasteful and pointless overhead: for (;;) { if ([NSApp runModalSession:session] != NSRunContinuesResponse) break; } This code is copied straight from the Apple documentation page -