I’m aware that to preserve memory usage, UITableViewCells are reused when scrolling. I have some custom UITableViewCells that have UITextFields in them. After text is inputted to the UITextField, and I scroll, that text is lost because of the cell reuse.
How can I make this text persist through scrolls? I’m thinking I can store each cell’s text in its own index of an NSMutableArray. Then, when the cell is reused, I can repopulate it with the array data.
How would I go about doing this? Would someone be so kind as to post a code sample?
sample.h
sample.m