更改 .xcdatamodeld 文件中 .xcdatamodel 条目的顺序
我有几个核心数据模型版本已添加到我的 .xcdatamodeld 文件中,并且我添加的最后一个版本没有像通常那样显示在列表顶部,它是 .xcdatamodeld 文件下列表中的第二项。 xcdatamodeld 文件。我将最新版本设置为当前版本化的核心数据模型,但我无法通过拖动 .xcdatamodel 条目来重新排序它们,所以有什么方法可以更改条目的顺序,以便最新版本显示在顶部?
顺便说一句,我使用的是 Snow Leopard 的 Xcode 4.2 build 4C199。
I have several Core Data model version that I have added to my .xcdatamodeld file, and this last version that I added did not show up at the top of the list as it normally does, it is the 2nd item in the list under the .xcdatamodeld file. I set the latest version as the current versioned Core Data model, but I cannot reorder the .xcdatamodel entries by dragging them around, so is there any way that I can change the order of the entries so that the newest version shows up at the top?
By the way, I am on Xcode 4.2 build 4C199 for Snow Leopard.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这部分非常烦人 - 但它并不太难。我一直这样做。您必须使用文本编辑器自行编辑 MyProject.xcodeproj/project.pbxproj 文件(我使用 vim),并查找模型列表的位置,然后只需重新排序子项部分,如下所示:
Yeah, this part is totally annoying - but it's not too hard. I do it all the time. You have to edit the MyProject.xcodeproj/project.pbxproj file yourself with a text editor (I use vim for this), and look for where your list of models are, then just re-order the children section, like this:
在 Xcode 版本 12.4(可能是更早的版本)中,此信息已发生变化。
为核心数据实体添加属性时,+ 会在列表顶部插入新属性以供编辑。但是,返回实体将按字母顺序显示属性。
With Xcode Version 12.4--and probably a much earlier version--this information has changed.
When adding attributes for a Core Data entity, the + inserts a new attribute at the top of the list for editing. However, coming back to the entity will show the attributes in alphabetical order.