在 iPhone 上存储静态内容?

发布于 2024-08-22 01:19:18 字数 81 浏览 3 评论 0原文

我想知道为我的应用程序存储静态内容的最佳方式是什么。 例如产品列表(名称、照片、价格、网址)。

也许这样可以直接找到一个好的教程吗?

I was wondering what is the best way to store static content for my app.
E.g. a list of products (name, photos, price, url).

Maybe s.o. can direct to a good tutorial?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

晚风撩人 2024-08-29 01:19:18

我认为 Core Data 是最好的方法,你应该使用它。

这是 Apple 文档的链接(教程 )

Jeff Lamarche 的博客中也有一个很好的讨论 帖子

一个值得检查的好东西是 Jeff 的书“更多 iPhone 3 开发”。

I think Core Data is the best way , and you should use that.

Here's a link to Apple's Docs ( tutorial )

Also theres a good discussion in Jeff Lamarche's blog in this post

A good thing to check for, would be Jeff's book "More iPhone 3 Development".

故人如初 2024-08-29 01:19:18

您可以将所有内容存储在 SQLite 数据库文件中,该文件将作为应用程序中的资源提供。但当然最好让 Core Data 为您读取该文件。

You can store everything in a SQLite database file which would be provided as a resource in your app. But it is of course better to let Core Data read that file for you.

心头的小情儿 2024-08-29 01:19:18

我认为 Core Data 和 SQLite 对于你想要的东西来说都太重了。除非您有大量产品列表,否则您应该将它们存储在 plist 中。设置最少,并且访问它比任何其他解决方案都容易得多。它非常适合少量静态信息,并且非常易于以后编辑。

以下是使用 plist 的教程:

http://humblecoder .blogspot.com/2009/05/iphone-tutorial-storing-and-retriving.html

I think both Core Data and SQLite are too heavy duty for what you want. Unless you have a large list of products, you should store them in a plist. The setup is minimal and accessing it is far easier than any of the other solutions. It's ideal for a small amount of static information and very easy to edit later.

Here's a tutorial on using plists:

http://humblecoder.blogspot.com/2009/05/iphone-tutorial-storing-and-retrieving.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文