class - 数据源导出

标签 class uitableview datasource outlet

我想知道如何在 UITableView 类上使用 socket 、数据源。我被困住了,因为我无法查看表上的任何数据。有人知道怎么做吗?我看过其他网站,但他们的提示不起作用。我尝试使用界面生成器应用程序将数据源添加到 UITableView 类

最佳答案

UITableView 的 dataSource 属性是您分配给 tableView 的委托(delegate)...然后 tableView 在收集数据时调用该分配的类。为了获取要显示的数据在 tableView 上,您需要实现 UITableViewDataSource 委托(delegate)方法...

一个好的起点是查看 UITableView 类引用:

http://developer.apple.com/library/ios/documentation/uikit/reference/UITableView_Class/Reference/Reference.html - UITableView类引用

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableViewDelegate_Protocol/Reference/Reference.html - UITableViewDelegate 协议(protocol)类引用

http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDataSource_Protocol/Reference/Reference.html - UITableViewDataSource 协议(protocol)类引用

另外,看看这个示例代码:

http://developer.apple.com/library/ios/ipad/#samplecode/TableViewSuite/Introduction/Intro.html

关于class - 数据源导出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10421802/

相关文章:

javascript - 如何将自定义事件添加到 Node 中的类中?

c# - 不支持关键字 : 'data source' web. 配置

r - R中整数类和数字类有什么区别

ios - UIImage 中的编码字符串返回 null

ios - 在 tableview 显示之前添加加载 View Controller

ios - 取消选择表行删除索引行

sql-server - 从 DGV 添加列到 SQL Server 的问题

java - 使用 JNDI + Weblogic 的 Hibernate 数据源

python - 为什么这个类变量在不同的实例中是相同的?

python - 在 Python 中调用函数之前检查函数是否引发 NotImplementedError