作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的 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/
我是一名优秀的程序员,十分优秀!