I have a UITableView with custom UITableViewCells , each of them has a UITextField. I assing to each textField a tag with value : indexPath.row + 100.
Well , i want to update each textField for each cell , when i type something in a specific textField. To be more clear , when I type a number, my viewcontroller should make some calculations and then assing the result to all others textFields, and this must be done each time a modify text from textField , let’s say i typed 1 (make some calculations and assing result to textFields) , then i type 2 , now number to calculate from, will be 12 and so on.
The issue is that i can reloaddata from tableView without closing keyboar. System will automatically hide UIKeyboard , so reloaddata in this case does not work.
I tried to use an NSMutableArray to store all this textFields but they gets a lot , when adding them from cellForRowAtIndexPath.
How can I update properly all these UITextFields ?
It needs to update only visible cells, but not all of them.
Assuming the content calculation formula is pretty simple:
And each cell contains
UITextFieldobject with tagindexPath.row + 100:Then all visible cells are to be updated in
textFieldTextDidChange:method:Lets have 50 cells:
And lets hide keyboard when finish editing:
Enjoy!