I have a UITableView made of static cells, and each cell contains a UILabel which is populated with field data when the screen loads. There are more cells than can fit on one screen, so the table view scrolls. The UILabels are hidden at design-time and I want to set them visible once all the text properties have been set. I’ve been using the subviews property of the tableView to iterate through the labels to setHidden:NO but this only affects the labels within cells that are currently in view. How can I iterate through all the UILabels regardless of which ones are in view or not?
Thanks
Jonathan
You can address this issue inside your
tableView:cellForRowAtIndexPath:method.Assuming that you have implemented your static cells the way Apple’s guide suggests, your
tableView:cellForRowAtIndexPath:should look like a sequence ofif-then-elsestatements returning the cells provided throughIBOutletobjects:Modify this code as follows:
When all text properties have been set, call
reloadDatato force all cells to go through yourtableView:cellForRowAtIndexPath:and get reconfigured.