将核心数据添加到现有的 iPhone 应用程序 [英] Adding Core Data to an existing iPhone app

查看:21
本文介绍了将核心数据添加到现有的 iPhone 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经启动了我的应用程序,现在我想将 Core Data 添加到我的应用程序中.如何添加?

I have started my application and now I want to add Core Data to my app. How can I add it?

推荐答案

我不同意你必须开始一个新项目.将 CoreData 集成到现有项目中实际上非常容易——一个好的起点是创建一个新的 CoreData 项目,但将它生成的代码复制到现有项目中(仔细检查应用程序委托,看看它设置了什么).真正涉及的代码并不多,而且很容易创建新的数据模型.

I disagree that you have to start a new project. It's actually pretty easy to integrate CoreData into an existing project - a good starting point is to create a new CoreData project, but copy the code it generates into your existing project (examine carefully the app delegate to see what it sets up). There's really not that much code involved, and it's easy to create new data models.

通过 Apple 的 CoreData 教程来了解正在发生的事情也是一个非常好的主意,而且还有一些好书.

It's also a really good idea to work through Apple's CoreData tutorials to understand what is going on, and there are some good books as well.

这篇关于将核心数据添加到现有的 iPhone 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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