在xcode 4中为核心数据属性生成代码 [英] Generate code for core data attributes in xcode 4

查看:123
本文介绍了在xcode 4中为核心数据属性生成代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在xcode 3中,在数据模型构建器中有一个有用的功能,您可以在实体中突出显示一些属性/关系,右键单击并选择将方法和属性声明复制到剪贴板。 (你可以选择是否也需要objective-c 2.0属性声明)。然后你可以将它们粘贴到NSManagedObject子类中。

In xcode 3 there was a helpful feature in the data model builder where you could highlight some attributes/relationships in an entity, right-click, and choose to copy method and property declarations to the clipboard. (You could choose if you wanted objective-c 2.0 property declarations also). Then you could paste them into your NSManagedObject subclass.

我看到你仍然可以生成整个类文件;但如果您要向现有实体添加属性,这不是有帮助的。他们从xcode 4中删除了此功能吗?

I see how you can still generate the entire class file; but this isn't helpful if you are adding attributes to an existing entity. Have they removed this feature from xcode 4? I used it all the time!

推荐答案

查看核心数据模型编辑器帮助:为托管对象创建Objective-C访问器方法

See the Core Data Model Editor Help: Creating Objective-C Accessor Methods for a Managed Object

这篇关于在xcode 4中为核心数据属性生成代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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