如何在 xcode 4.0 中为核心数据属性设置默认值?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8571776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:47:31  来源:igfitidea点击:

How to set default value for a core data attribute in xcode 4.0?

xcodecore-data

提问by aqua23

I switched from xcode 3.2 to xcode 4.0.In xcode 3.2 there used to be set default value along with attribute name and type.I can't find it in xcode 4.0

我从 xcode 3.2 切换到 xcode 4.0。在 xcode 3.2 中曾经设置默认值以及属性名称和类型。我在 xcode 4.0 中找不到它

回答by Bogdan

Open the Utilities panel (CMD + ALT + 0) (the one from the right side in XCode), then click on the third option (Show the Data Model inspector). You'll find there all you need. You must select the attribute you want to set the default value for.

打开实用程序面板(CMD + ALT + 0)(XCode 右侧的那个),然后单击第三个选项(显示数据模型检查器)。你会在那里找到你需要的一切。您必须选择要为其设置默认值的属性。

回答by Nicolas Bachschmidt

The settings of your CoreData attributes are now in the Data Model Inspector in the Utilities (View > Utilities > Show Data Model Inspector).

CoreData 属性的设置现在位于实用程序中的数据模型检查器中(视图 > 实用工具 > 显示数据模型检查器)。