在 Xcode 4 中创建表视图
我是 Xcode 4 的新手,并且在使用 TableView 时遇到一些问题。 我有一个 ViewController,我将其拖入 TableView 中。 我有源模型,并创建了一个数组, 但我不知道如何让 TableView 显示值。
我不想使用 TableViewController,因为我希望表格比 iPhone 屏幕小 - 但如果没有它,我不知道如何将 TableView 连接到控制器。
有人可以为我提供一个很好的分步解释来说明如何做到这一点吗?
谢谢
I'm new to Xcode 4, and having some problems with TableView.
I have a ViewController which I dragged into a TableView.
I have the source model, and created an array,
but I don't know how to get the TableView to display the values.
I don't want to use a TableViewController, because I want the table to be smaller than the IPhone screen - but without it I don't know how to connect the TableView to a controller.
can someone provide me a good step-by-step explanation of how to do it?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
创建 TableView 的简单而高效的示例,此处
A simple and efficient example of creating a TableView , here
表视图控制器在编辑模式和表上的一些视觉功能方面为您提供了一些额外的功能,但是您可以将表视图添加到由标准视图控制器管理的视图中,就可以了。
Table view controllers give you a little extra in terms of editing mode and a few visual features on the table, but you can add a table view to a view managed by a standard view controller and be just fine.
如果我正确理解了问题以将较小的表连接到代码,则右键单击界面生成器中的表并将委托连接到文件所有者,它应该可以工作。
否则,如果您查看 http://www.geekylemon.com 他们有一些非常好的教程
干杯
If i understoof the question correctly to connect the smaller table to the code, you right click on the table in the interface builder and connect the delegate to the files owner it should work.
Otherwise if you check out http://www.geekylemon.com they have some really good tutorials
Cheers