My UITableView
has custom UIView
headers in every section. I am needing to refresh only the headers and not the other content in the section. I have tried out [self.tableView headerViewForSection:i]
and it does not return anything even though it should. Is there anyway that I can do this?
Edit: Code based around new suggestion
I have given this a shot as well and it calls/updates the UIView within that method, but the changes do not visually propagate onto the screen.
for (int i = 0; i < self.objects.count; i++) {
UIView *headerView = [self tableView:self.tableView viewForHeaderInSection:i];
[headerView setNeedsDisplay];
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…