获取UITableView 的cell 及其cell上的controll

假设定义了一个UITableView *myTableView;

sectionIndex为row所在的Section,rowIndex及row所在行

UITableViewCell *cell = [myTableView  cellForRowAtIndexPath:[NSIndexParh indexPathForRow:rowIndex inSection:sectionIndex];


那么对于获取cell上的controller;


则可以采用 id controller = [cell viewWithTag:tag];

可以先设置好controller 的tag即可;

当然如果controller为cell 的 property,直接采用点操作了

eg:cell.title;

posted @ 2012-12-21 11:06  沙影无痕  阅读(132)  评论(0编辑  收藏  举报