简体   繁体   English

核心数据的详细视图

[英]Detail view from core data

I saw a question like this the other day and I was hoping it would be answered but it seems to of been deleted now. 前几天我看到了这样的问题,我希望它能得到解答,但现在似乎已被删除。 Im not sure why. 我不确定为什么。

What I have been following is Ray Wenderlich's tutorial on importing data into core data on launch and populating a table with it. 我一直关注的是Ray Wenderlich的教程, 教程在启动时将数据导入到核心数据中并使用它填充表。 His tutorials are excellent but he does not then explain how to provide a detail view for the application. 他的教程非常出色,但是他随后不解释如何为应用程序提供详细视图。 The final tutorial ends on this: 最后的教程就此结束:

在此处输入图片说明

I am lost about how to create the detail view using core data. 我不知道如何使用核心数据创建详细信息视图。 I have done so using an array but I cannot seem to incorporate it into this situation. 我这样做是使用数组,但我似乎无法将其合并到这种情况下。

Has anyone done this tutorial before? 有人做过本教程吗? Can I get directions into what method I should be looking at? 我可以得到应该使用哪种方法的指导吗?

I have completed a detail view before using an array shown in AppCoda . 在使用AppCoda中显示的数组之前,我已经完成了详细视图。 Would this work with core data? 这可以与核心数据一起使用吗?

I have been looking at this for a few days and it is breaking me down. 我已经看了几天,这让我失望了。 I have done similar applications before but never with core data and I am a bit confused about passing the Data Between View Controllers. 我之前曾做过类似的应用程序,但从未使用过核心数据,而且我对在视图控制器之间传递数据感到有些困惑。

Any suggestions or directions about where I should be looking? 关于我应该去哪里的任何建议或指示?

Create a new UIViewController to act as your detail view controller. 创建一个新的UIViewController作为您的详细信息视图控制器。 Give it a constructor so that you can pass in the data you want to use to customize it. 给它一个构造函数,以便您可以传入要用于自定义它的数据。 This tutorial describes how to create a generic detail view controller, you'd just need to expand it to customize the init method so you can pass in your data, and then use the data within the detail view to populate any relevant fields. 本教程描述了如何创建通用的详细视图控制器,您只需对其进行扩展以自定义init方法,以便可以传入数据,然后使用详细视图中的数据填充任何相关字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM