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.
我有两个NSWindows,都带有一个NSPanel。我想在按下按钮时切换窗口。如何才能做到这一点?我不再需要旧窗口,所以我只想展示新窗口。
NSWindows
NSPanel
要聚焦第二个窗口,只需调用:
[window2 makeKeyWindow];