您的位置:首页 > 移动开发 > IOS开发

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

2015-05-29 18:11 507 查看
根据点击的是哪个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
}
}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  iOS开发 tableview cell