Reputation: 75
In my table I use UITextField
istead of UILabel
(with enabled = 0
).
Now pressign an add button, the last cell shall become editable. I tried the following:
UITextField *textField = [subviewsOfCell ObjectAtIndex:index];
[textField becomeFirstResponder];
but I doesn't get it editable. (I know that I get the correct cell, because textField.text = @"test";
displays correctly). What must I do?
Upvotes: 0
Views: 1361
Reputation: 7663
Just try doing this:
UITextField *textField = [subviewsOfCell ObjectAtIndex:index];
textField.enabled = YES;
[textField becomeFirstResponder];
Let me know if that works for you.
Upvotes: 2