I have a custom cell with a UIView that I am trying to update the frame on in cellForRowAtIndexPath
. The frames are all updated successfully for the rows that load in the first pass of rows. However, the rows that need to be scrolled to be seen do not have their view frame updated until scrolling them into view, scrolling them out of view, and then scrolling them back into view.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
RoundCell *cell = (RoundCell *)[tableView dequeueReusableCellWithIdentifier:@"RoundCell"];
CGRect frame = CGRectMake(160, 10, 50, 22);
cell.rightConfidenceBar.frame = frame;
}
For the rows that are not initially loaded, why do I need to scroll them into view, out of view, then back into view before their UIView frame is updated?