Search code examples
objective-cmacosmainwindowkeywindow

Disable interaction with main window, while other window is open


I have a main window where all the work is done. When i open the preference panel I would like to freeze the main windows as long as the preference panel is open. For example iTunes: as soon as i open the preferences i just can interact with preference panel and nothing else.

Is there an easy way to archive this behavior?


Solution

  • Code:

    [NSApp runModalForWindow:theWindow];