Xcode 菜单项编辑器/添加模型版本...丢失

发布于 2025-01-07 12:14:27 字数 337 浏览 0 评论 0原文

每隔一段时间,我就会尝试添加新的数据模型版本,但菜单项丢失。编辑器菜单似乎应该根据所选文件而变化,但有时不会发生这种情况。过去我随机点击、清理、建造等等,最终它再次出现,我不知道发生了什么。今天重启 Xcode 似乎修复了这个问题,但我不知道这是否永远有效。下面是两个屏幕截图,第一个显示错误的菜单,第二个显示正确的菜单。在这两种情况下都选择了我的数据模型。还有其他人看过这个吗?这是一个错误,还是我缺少一些设置或选择? 在此处输入图像描述 在此处输入图像描述

Every once in a while I try to add a new data model version, and the menu item is missing. It seems the Editor menu is supposed to change depending on the file selected, and this sometimes doesn't happen. It the past I've randomly clicked, cleaned, built, etc. and eventually it showed up again with me not knowing what happened. Today it seems restarting Xcode fixed it, but I don't know if that will always work. Below are two screen shots, the first showing the wrong menu, and the second showing the correct menu. My data model is selected in both cases. Has anyone else seen this? Is it a bug, or is there some setting or selection I'm missing?
enter image description here
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

单挑你×的.吻 2025-01-14 12:14:27

从该文件导航栏的颜色我可以看到您没有选择数据模型文件。您可能处于“助理编辑器”模式,并且右侧有一个 .h 或 .m 文件。活动光标也位于正确的文件中。

选定的文件显示较深的灰色阴影:

在此处输入图像描述

未选定的文件使用较浅的灰色阴影:

< img src="https://i.sstatic.net/DXjBB.png" alt="在此处输入图像描述">

重要的是要知道,当您选择不同的文件时,左侧栏中的文件选择突出显示不会改变不使用侧边栏。编辑文件时不要相信侧边栏。

首先单击数据模型文件,您的菜单将如您所期望的那样。

From the color of that file navigator bar I can see that you did not select the datamodel file. You probably were in "Assistant Editor"-Mode and had a .h or .m file on the right side. The active cursor was in the right file too.

The selected file shows a darker shade of gray:

enter image description here

The not selected file uses a lighter shade of gray:

enter image description here

It's important to know that the file selection highlight in the left side bar does not change when you select a different file without using the side bar. Don't trust the sidebar when you are editing files.

Click into the data model file first and your menu will be like you expect it.

深海不蓝 2025-01-14 12:14:27

除非你在选择文件后超级快地选择菜单(可能没有给 Xcode 时间来交换它),否则我会说提交错误报告 http://bugreporter.apple.com

您应该给 Xcode 一些时间来交换菜单,以确定它是什么类型的错误,如果它在 60 秒左右后没有交换出来,那么它可能不仅仅是一场表演 问题)。确保包含系统配置文件,因为我刚刚检查了我的系统配置文件,每次我切换到数据模型时,它都会相应地更改菜单。

xib 文件是否会发生同样的情况?您使用的任何其他文件类型有时具有不同的菜单?

Unless your are selecting the menu super fast after selecting the file (possibly not giving Xcode time to swap it out) then I say file a bug report http://bugreporter.apple.com

You should give Xcode a few moments to swap the menu out though to determine what kind of bug it is, if it doesn't swap out after 60 seconds or so then it likely isn't just a performance issue). Make sure to include a system profile as I just checked on my and every time I switched to a data model it changed the menu accordingly.

Does the same thing ever happen with xib files? Any other file types you use that sometimes have different menus?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文