2013-04-10 111 views

回答

0

的 “下拉列表对话框” 被称为表,可以是一个NSWindow。

的方法,让他们展示了可以修改的NSApplication中找到:beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:

一个超级简单的实现看起来是这个样子:

NSWindowController *sheet = [[NSWindowController alloc] initWithWindowNibName:@"Sheet"]; 

[NSApp beginSheet: sheet.window 
    modalForWindow: self.view.window // The window from where the sheet will appear 
    modalDelegate: self 
    didEndSelector: nil // Optional @selector(didEndSheet:returnCode:contextInfo:) 
     contextInfo: nil];