I have created a table which dynamically creates cells which are customized to contain a textField. When I run the program, I am able to enter text into the textFields. However, I am not able to collect the text entered into them before quitting the program/switching to a different viewController. Can you please suggest what I should do in order to extract the text entered by the user.
I understand that I can access the cells using the following code...
for (int section = 1; section < [self.tableView numberOfSections]; section++) // section 0: profile picture
{
for(int row = 0; row < [self.tableView numberOfRowsInSection:section]; row++)
{
NSLog(@"section = %d, row = %d", section, row);
NSIndexPath *tempIndexPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell *tempCell = [self tableView:self.tableView cellForRowAtIndexPath:tempIndexPath];
// NSLog(@"tempCell = %@", tempCell);
}
}
But I am not able to extract the text contained in them.
I also referred to: Accessing UITextField in a custom UITableViewCell. But I am looking for a cleaner solution.
Thanks!