一个很好的 XCode 示例项目,带有 SQlite、tableview、主演和重新排序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3152436/
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
A good XCode sample project with SQlite, tableview, starring and reordering
提问by John
I'm a complete newbie to Objective-C/XCode and it's been a bit daunting so far. I wanted to get my hands dirty by building something that incorporates a few concepts.
我是 Objective-C/XCode 的完全新手,到目前为止它有点令人生畏。我想通过构建包含一些概念的东西来弄脏我的手。
All I want to do is have a table which is populated by rows from a SQLite database. The table should have reordering capability, I want to have a starring facility, and then delete (which I believe is standard)
我想要做的就是有一个由 SQLite 数据库中的行填充的表。该表应该具有重新排序功能,我想要一个星级设施,然后删除(我认为这是标准的)
Of course I can stitch this by looking at a few sample projects, but I was wondering if there is a good sample project that has these features I could look at as a starting point. If there isn't, any other recommended sample projects that have parts of this are also thankfully received.
当然,我可以通过查看一些示例项目来拼接它,但我想知道是否有一个很好的示例项目可以将这些功能作为我的起点。如果没有,也很幸运地收到了包含此部分内容的任何其他推荐示例项目。
回答by bbum
Since you are new to the platform and your needs are straightforward, I would suggest usi Core Data. The conceptual guide included with the documentation is quite good and there are tons of online resources, too.
由于您是该平台的新手并且您的需求很简单,我建议您使用 Core Data。文档中包含的概念指南非常好,也有大量的在线资源。
There is very little reason to use Sqlite directly (and many many reasons not too).
直接使用 Sqlite 的理由很少(而且很多理由也不是)。