创建UITableView之后调用哪个协议方法 [英] Which protocol method call after created UITableView

查看:49
本文介绍了创建UITableView之后调用哪个协议方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉在这里提出这种简单的问题.

但是我是iOS开发的新手:(我也在Google上尝试找到我的答案,但我不明白.

But I am new at iOS development :( also i am trying on google for find my answer but i don't get it.

我的问题是在创建整个TableView之后调用 UITableView 的哪种协议方法?

My Question is that which protocol method of UITableView is call after created whole TableView ?

我的意思是,当创建 UITableView 时,然后调用 UITableViewDataSource 方法,例如,

i mean when create UITableView then call UITableViewDataSource method such like ,

配置表格视图

– tableView:cellForRowAtIndexPath:  required method
– numberOfSectionsInTableView:
– tableView:numberOfRowsInSection:  required method
– sectionIndexTitlesForTableView:
– tableView:sectionForSectionIndexTitle:atIndex:
– tableView:titleForHeaderInSection:
– tableView:titleForFooterInSection:

等...

但是我想在没有任何UITableView交互的情况下创建整个TableView(方法之上的OR调用)后知道UITableView调用的方法是什么?

But i want to know which method of UITableView call after creating whole TableView (OR call above methods) without any UITableView interaction ?

所以,请帮助我

推荐答案

要创建UITable,必须调用所有必需的方法.即

For creation of UITable all required method has to called. i.e.

– tableView:cellForRowAtIndexPath:  
– tableView:numberOfRowsInSection: 

当然,这些是数据源方法.但是在创建表之后,直到重新加载表之前,不会调用此方法.如果要创建表视图后调用的方法,则必须查找类似以下的委托方法:

Off course these are datasource method . But after creation of the table none of this method called until you reload the table. If you want method that called after creation of the tableview you have to look for delegate methods like:

– tableView:willSelectRowAtIndexPath:
– tableView:didSelectRowAtIndexPath:
– tableView:willDeselectRowAtIndexPath:
– tableView:didDeselectRowAtIndexPath:

这篇关于创建UITableView之后调用哪个协议方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆