I am using below code for getting index number of the row. I want to get the Text of row. Please tell me, what modifications are required to get the text from each row.
-(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 in advance 🙂
You can get cell with all its properties this way:
Is this what you want? Text from selected cell?