I have n sections (known amount) and X rows in each section (unknown amount. Each row has a UITextField. When the user taps the “Done” button I want to iterate through each cell and do some conditional tests with the UITextField. If the tests pass data from each cell is written to a database. If not, then a UIAlert is shown. What is the best way to loop through the rows and if there is a more elegant solution to this please do advise.
Share
If you only want to iterate through the visible cells, then use
If you want all cells of the table view, then use this:
Now you can iterate through all cells:
(CustomTableViewCell is a class, which contains the property textField of the type UITextField)