I have a UITextField subview within one of my UITableView rows. When I tap on a row (outside of the UITextField frame), I would like the UITextField to become editable (ie. make the numeric keypad appear) as if I had tapped within the UITextField frame.
I have seen some similar questions which suggested using becomeFirstResponder but this isn’t working for me.
How would I do this? Should I be forwarding the touch events outside of the UITextField frame into the UITextField somehow?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self selectSection: indexPath.section];
switch( indexPath.section )
{
case SECTION_RATE:
currentTextField = editRate;
[editRate becomeFirstResponder];
break;
case SECTION_UNITS:
currentTextField = editUnits;
[editUnits becomeFirstResponder];
break;
default:
break;
}
}
In your didSelectRowAtIndexPath check the index path and