0
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath(NSIndexPath *)indexPath
{
NSLog(@"%@", indexPath);
NSLog(@"%@", cell.textLabel.text);
}
,但在多個tableview中的情況下,我不能讓選擇表格單元格 爲表1:如何在iOS的多表視圖中使用didSelctRowAtIndexPath?
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath(NSIndexPath *)indexPath
{
if(tableview==table1)
NSLog(@"%@", cell.textLabel.text);
}
if(tableview==table2)
{
NSLog(@"%@", cell.textLabel.text);
}
}
可能重複【如何處理兩個的TableView(http://stackoverflow.com/questions/9318098/how-to-deal -with-two-tableview) –
從哪裏來的var'cell'? – Larme