ios tableview didSelectRowAtIndexPath方法中,获取某个cell的实例

时间:2015-08-13 22:15:14   收藏:0   阅读:400


选中tableView的某一行,触发如下方法:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

}


若此时需要对tableview的cell做处理,就需要先得到改行cell对应的实例,可运用如下方法: 

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

或者某个自定义cell

MyCustomCell *cell = (MyCustomCell *)[tableView cellForRowAtIndexPath:indexPath];

    


版权声明:本文为博主原创文章,未经博主允许不得转载。

原文:http://blog.csdn.net/lijuan3203/article/details/47621969

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!