I created a UIListContentConfiguration, set the initial text and set it on the cell. Then I updated the text and was expecting the cell to show the new text and sadly that didn't happen. Here is some sample code:
Then I noticed that cell.contentConfiguration is a copy property type. Perhaps the API could be improved to change it to a strong property type, and have the cell do KVO on the configuration's text so we can update afterwards and the cell will automatically update to the new text. The same way as how MKAnnotation and MKAnnotationView works for its coordinate, title and subtitle.
Code Block - (void)configureCell:(UITableViewCell *)cell withEvent:(Event *)event { UIListContentConfiguration *content = cell.defaultContentConfiguration; content.text = event.timestamp.description; cell.contentConfiguration = content; [self performSelector:@selector(updateTest:) withObject:content afterDelay:3]; } - (void)updateTest:(UIListContentConfiguration *)content{ content.text = @"Updated text"; }
Then I noticed that cell.contentConfiguration is a copy property type. Perhaps the API could be improved to change it to a strong property type, and have the cell do KVO on the configuration's text so we can update afterwards and the cell will automatically update to the new text. The same way as how MKAnnotation and MKAnnotationView works for its coordinate, title and subtitle.