I have a custom cell. In it is a UITextField linked to customCell.m. I\'m trying to pass the text from the textField to mainVC.m
As per my understanding I think you looking for this approach, Let me know if I am wrong here.
In did select row at index path, First you need to find the your custom cell and then the textfield you required. Like this:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
customCell* cell=(customCell*)[tableView cellForRowAtIndexPath:indexPath.Row];
NSString* yourTextFieldText=cell.textField.text;
mainVC* objmainVC=[mainVC alloc]init];
objmainVC.yourTextFieldText=yourTextFieldText;
[self.navigationController pushViewController:objmainVC animated:YES];
}
Now you can use yourTextFieldText to mainVC controller as well.