0
在下面的代碼所缺少(從蘋果例如網頁)ObjectiveC模式對話框。也有一些是我對課堂互動
- (void)showCustomDialog: (NSWindow *)window
// User has asked to see the dialog. Display it.
{
if (!myCustomDialog)
[NSBundle loadNibNamed: @"MyCustomDialog" owner: self];
[NSApp beginSheet: myCustomDialog
modalForWindow: window
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
[NSApp runModalForWindow: myCustomDialog];
// Dialog is up here.
[NSApp endSheet: myCustomDialog];
[myCustomDialog orderOut: self];
}
是如何myCustomDialog可變曾經設置爲任何東西,是什麼時候?
添加鏈接到示例 – Joe
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Sheets/Tasks/UsingAppModalDialogs.html –