I have 5 cells in a UITableView. Each has a UITextField as a subview, where the user will input data. If I DO use cell reuse, the textfield gets cleared if the cells are scrolled out of view. I don’t want to have to deal with this. Is there a way to NOT reuse cells so that I don’t have this issue, if so, how?
Is this a bad idea?
I have same feature in one of my apps and I used below code to accomplish that and I never had this kind of problem.
First of all you need to store all your textField value temporary in Array. Make array like this.
Then Give all textField tag = indexPath.row;
After that You need to replace textField value in below two methods.
At Last You need to set that value in cellForRowAtIndexPath datasource Method. So that whenever user scroll tableview it set previous value from temp array. Like this.
It might possible I forgot some of the code to paste here. So if you have any problem please let me know.