gpt4 book ai didi

macos - 如何摆脱“进入全屏”菜单项?

转载 作者:行者123 更新时间:2023-12-03 16:23:38 27 4
gpt4 key购买 nike

在我的 Mac OS X 应用程序中,我删除了所有默认菜单项,添加了我自己的菜单项。

但是在底部的View菜单中我仍然可以看到Enter Full Screen菜单项,而在 Storyboard中没有这样的菜单项。

我尝试删除整个View菜单,但现在它迁移到Window菜单。即使它被禁用,如果可能的话我仍然想完全摆脱它。

最佳答案

release notes对于 AppKit for 10.11,建议您可以使用 NSUserDefault NSFullScreenMenuItemEverywhere

Full Screen Menu Item

AppKit automatically creates an "Enter Full Screen" menu item after the application finishes launching if an equivalent menu item isn't found. If this menu item should not be created for your app, before NSApplicationDidFinishLaunchingNotification is sent you may set the NSFullScreenMenuItemEverywhere default to NO.

- (void)applicationWillFinishLaunching:(nonnull NSNotification *)notification {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
}

关于macos - 如何摆脱“进入全屏”菜单项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52154977/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com