You should end the editing of the textfield by calling [myTextField resignFirstResponder]
when the third row is clicked.
What executes textFieldDidBeginEditing on uitextfield within UITableCell
-
31-03-2022 - |
Question
I have a UITextField inside a UITableViewCell (custom cell ).
I have 3 rows in my UITableView. the 2nd row is the text field row. The 3rd row is a link to open another view through an animation block.
The problem I have is if the user is editing the amount and clicks the 3rd row, to forwards to that screen, then when I dismissing this new viewcontroller, the screen goes back to the UITableview controller and fires textFieldDidBeginEditing.
How can I cancel this or avoid the user being sent back into the editing mode? I tried resigning in the table cell and the view controller and no luck.
La solution
Autres conseils
Return NO from this delegate method for the field you want to disable editing.
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow