Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 创建不包含';t阻止与其他窗口的交互_Objective C_Cocoa_Window_Modal Dialog_Nspanel - Fatal编程技术网

Objective c 创建不包含';t阻止与其他窗口的交互

Objective c 创建不包含';t阻止与其他窗口的交互,objective-c,cocoa,window,modal-dialog,nspanel,Objective C,Cocoa,Window,Modal Dialog,Nspanel,据我所知,在不“冻结”某个窗口的情况下,应用程序只能是NSSavePanels、NSOpenPanels和NSAlerts窗口(因为NSAlert不是NSWindow或NSPanel子类,但它有一个关联的窗口);例如,如果我想要一个通用的NSPanel就是这样一个表单,我无法阻止它冻结应用程序,因为启动该表单的唯一方法是使用 [NSApp beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] 那么,有没有办法在

据我所知,在不“冻结”某个窗口的情况下,应用程序只能是
NSSavePanel
s、
NSOpenPanel
s和
NSAlert
s窗口(因为NSAlert不是NSWindow或NSPanel子类,但它有一个关联的窗口);例如,如果我想要一个通用的
NSPanel
就是这样一个表单,我无法阻止它冻结应用程序,因为启动该表单的唯一方法是使用

[NSApp beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]

那么,有没有办法在不冻结整个应用程序的情况下将通用面板设置为工作表呢?

-[beginSheet:modalForWindow:modalDelegate:DiEndSelector:contextInfo:
对于使用
NSPanel
的用户来说,没有任何困难


但是,如果在同一文档上有多个窗口,
NSApp
将阻止该文档中的所有窗口,因为它实际上是文档模式,而不是窗口模式。

不清楚您在这里要做什么。你想让
NSPanel
完全非模态吗?我想让它成为一张纸(=附加到另一个窗口)而不冻结应用程序。你已经找到了这样做的方法,请使用
-[beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:
。什么对你不起作用?应用程序被冻结:它等待工作表关闭。你打开了多少个窗口?该工作表将阻止在该窗口中执行任何其他操作,但如果您在应用程序中打开了第二个窗口,它应该可以正常运行。