我使用下面的代码获取行的索引号。我想获得行的文本。请告诉我,需要进行哪些修改才能从每一行获取文本。Iphone tableview
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *__strong)indexPath{
DetailViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"Detail"];
[self.navigationController pushViewController:detail animated:YES];
detail.rowNum.text = [NSString stringWithFormat:@"Row: %d", (indexPath.row) ];
}
thanx提前:)
thanx Condor!其实我是新来的ios,所以你会告诉我在上面的代码中添加此代码的位置? – AppDeveloper
答复已更新。 –
谢谢秃鹰!你是伟大的 – AppDeveloper