根据点击的是哪个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
}
}