I am very new in cocoa for MAC. I created a NSWindow and i add a NSButton as subview in the NSWindow.
I want to show a modal window from click the NSButton. I saw the http://develop开发者_Go百科er.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Concepts/UsingModalWindows.html reference. But it is not so easy for beginner like me.
Thanks in advance
Modal dialogs are not as prevalent in the Mac operating system and are generally considered bad form. The only truly accepted modal dialog is a sheet which you attach to the window that it applies to.
Avoid modal modes when programming for the Mac when possible.
References:
- http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Sheets/Sheets.html#//apple_ref/doc/uid/10000002-BABFIBIA
- http://www.cocoadev.com/index.pl?DisplayingSheets
精彩评论