I have a UITableView
with multiple sections, each having multiple cells with discrete UIStepper
controls. Upon tapping and holding each cell’s UIStepper
a companion UILabel
is updated with the current UIStepper
value, as required.
This is working fine: hold the UIStepper
down and it increases the total, updating the UILabel
as it does so.
What I want is for the header of each section to sum the current total from all the cells in that section, and add that number to the header text, giving the user a quick sum of all the section’s cells UIStepper
values.
==================== Section Total: 12 ==================== Cell: 3 | - | + | -------------------- Cell: 5 | - | + | -------------------- Cell: 4 | - | + | ==================== Section Total: 9 ==================== Cell: 1 | - | + | -------------------- Cell: 2 | - | + | -------------------- Cell: 6 | - | + |
That’s working too, using a [self.tableView reloadData] ;
call.
However, it only registers each discrete touch made on the UIStepper
; the reloadData
call appears to stop the continuous touches being registered. This means to keep the total in the header in sync with the increasing values in that section’s cells requires the user to keep touching the control one tap at a time, rather than a press-and-hold.
Is there any way of reloading a single section’s header text throughout the ‘loop’, so it keeps track of the increasing value as the user holds their finger on the control?