如何摆脱输入全屏菜单项? [英] How to get rid of Enter Full Screen menu item?

查看:105
本文介绍了如何摆脱输入全屏菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In my Mac OS X app I deleted all default menu items, added my own.

但是在底部的View菜单中,我仍然可以看到Enter Full Screen菜单项,而在情节提要中没有这样的菜单项.

But in View menu at the bottom I can still see Enter Full Screen menu item, whilst in storyboard there is no such menu item.

我试图删除整个View菜单,但现在已迁移到Window菜单.即使已禁用它,我仍然希望在可能的情况下完全摆脱它.

I've tried to delete the entire View menu, but now it migrated to Window menu. Even though it's disabled, I would still like to get rid of it entirely if possible.

推荐答案

The release notes for AppKit for 10.11 suggest you can use the NSUserDefault NSFullScreenMenuItemEverywhere.

全屏菜单项

AppKit会自动创建一个"Enter Full Screen"(输入全屏)如果找不到等效的菜单项,则应用程序完成启动后的菜单项.如果不应该为您的应用创建此菜单项,则在发送NSApplicationDidFinishLaunchingNotification之前,您可以将NSFullScreenMenuItemEverywhere的默认值设置为NO.

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"];
}

这篇关于如何摆脱输入全屏菜单项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆