根据点击的是哪个section的哪个row 来做出响应。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section==0)
{
switch (indexPath.row)
{
case 0:
//do something
break;
case 1:
//do something
break;
}
}
else if (indexPath.section == 1)
{
//do something
}
else if (indexPath.section == 2)
{
//do something
}
}
本文介绍了一个UITableView点击事件处理的方法,通过判断点击的是哪个section的哪一行(row)来执行相应的操作。此方法适用于iOS开发中UITableView的点击事件处理。
3735

被折叠的 条评论
为什么被折叠?



