I have a grouped UITableView with many sections, however, I want to iterate through these sections after i tap a UIButton, so viewForHeaderInSection is useless in this case, I want to iterate through sections to change their headers frames, Im struggling to do it but to no avail until now.
I’d be grateful to anyone who helps me with this.
I have a grouped UITableView with many sections, however, I want to iterate through
Share
viewForHeaderInSectiongets called every time you callReloadDataon a table view.So you could have a Boolean that gets set to yes every time your button is pressed, and also call reloadData in the button’s action. In viewForHeaderInSection, check the value of the bool, if it’s true, set the size to what you want when the button is pressed, if false set it to the normal size.
I hope this helps.