Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法做到这一点?
现在,我接到电话,我正在做事,我必须打开一个窗口来请求输入,然后我必须在我从原始呼叫返回之前完成做事。
如果我进入窗口的运行循环,它永远不会结束或将控制权返回给我。
我在这里想念什么?
我知道了——[NSApp runModalForWindow: window]——它只运行窗口的循环,当你停止它时,控制权返回给你,使主运行循环不受干扰。
我正在做的是[NSApp run],它运行所有东西,所以当窗口发出停止信号时,一切都运行了。