获取静态TableView选中的cell来执行相应操作

来源:互联网 发布:falcon猎鹰手表知乎 编辑:程序博客网 时间:2024/04/29 10:48


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





0 0