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.
我有一个应用程序,NSWindow通过按下按钮打开第二个。这个新窗口使用[NSApp runModalForWindow:<myWindow>]. 我希望能够确定用户是否关闭了第二个窗口,以停止模式。
NSWindow
[NSApp runModalForWindow:<myWindow>]
窗口关闭时有多种通知方式。
NSWindowWillCloseNotification
NSWindowDelegate
windowShouldClose:
windowWillClose:
performClose:
如果没有更多信息,很难建议这些或其他选项中的哪一个最适合您。