4.4 Receiving and Handling Table View Events

来源:互联网 发布:孟加拉语翻译软件 编辑:程序博客网 时间:2024/06/08 16:14

接收并处理tableView事件

dataSource 为tableView提供要展示的数据
delegate 为tableView代理所发生的事件
delegate 还可为tableView代理以下事件
-> 当cell即将被选择,被选择,即将被反选,被反选
-> 当tableView需要知道cell的高度
-> 当tableView需要创建section的header和footer

tableView:didSelectRowAtIndexPath:如果代理实现了此方法,就可以在用户选择某一行时获得消息通知。

原创粉丝点击