如何启用“使用核心数据"在现有项目上? [英] How to enable "Use Core Data" on existing project?

查看:28
本文介绍了如何启用“使用核心数据"在现有项目上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建我的项目之前,我不确定是否要使用 Core Data.我想这是我以后可以轻松打开/关闭的东西.我开始后悔我没有立即决定的决定.

Before creating my project, I wasn't sure if I was going to use Core Data. I figured it'd be something I can easily toggle on/off later. I'm starting to regret my decision of not deciding immediately.

有什么办法可以打开它吗?还是我必须创建一个完全独立的项目才能启用它?

Is there any way I can turn it on? Or do I have to create an entirely separate project just to enable it?

推荐答案

转到 XCode 菜单并单击 File -> New -> File.然后向下滚动到核心数据并添加数据模型.从那以后,恐怕您将不得不研究如何从该数据模型中添加、编辑和删除数据.

Got to XCode menu and click File -> New -> File. Then scroll down to Core Data and add Data Model. From there I'm afraid you are going to have to study up on how to add, edit, and delete data from that Data Model.

他们不喜欢我们添加答案链接,因为它们会在一段时间后变得陈旧.我建议您访问 raywenderlich.com 网站并搜索 Core Data.那里有几个很好的教程可以帮助您入门.

They don't like us adding links to answers because they can go stale after a while. I suggest you go to the raywenderlich.com website and search on Core Data. There are several good tutorials there that will get you started.

这篇关于如何启用“使用核心数据"在现有项目上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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