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.
我一切正常,但是当我单击设置时,设置窗口(在 nswindowcontroller 中)会在我的 Mac 上运行的其他应用程序的背面打开。我希望它在前面,以便用户在单击它时可以看到它。
谢谢你们!
好像我终于让它工作了!:)
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
当用户单击设置菜单项时,我执行此代码 :) 编写此代码以防万一有人会寻找类似的东西。