Spent way too much time on this...grr..my workaround:
-(void)updateConfigurationUsingState:(UICellConfigurationState *)state
{
UIListContentConfiguration *contentConfig = (UIListContentConfiguration*)[self.contentConfiguration updatedConfigurationForState:state];
if (![contentConfig isKindOfClass:[UIListContentConfiguration class]]) { contentConfig = [[UIListContentConfiguration valueCellConfiguration] updatedConfigurationForState:state]; }
UIBackgroundConfiguration *backgroundConfig = [[UIBackgroundConfiguration clearConfiguration] updatedConfigurationForState:state];
UITraitCollection *traitCollection = state.traitCollection;
// Focus AND active
if (traitCollection.activeAppearance == UIUserInterfaceActiveAppearanceActive
&& state.isFocused)
{
backgroundConfig.backgroundColor = self.tintColor;
contentConfig.imageProperties.tintColor = UIColor.whiteColor;
contentConfig.textProperties.color = UIColor.whiteColor;
contentConfig.secondaryTextProperties.color = UIColor.whiteColor;
}
else {
if (state.isSelected || state.isHighlighted || state.isFocused)
{
// need an unemphasized selection color.
backgroundConfig.backgroundColor = [UIColor colorNamed:@"SomeKindOfLightGrayHereMaybe"];
}
contentConfig.imageProperties.tintColor = UIColor.darkGrayColor;
contentConfig.textProperties.color = UIColor.darkGrayColor;
contentConfig.secondaryTextProperties.color = UIColor.darkGrayColor;
}
self.backgroundConfiguration = backgroundConfig;
self.contentConfiguration = contentConfig;
}
These content configuration APIs have always been kind of an overcomplicated disaster IMO. You could try to duplicate the 'source list' selection style like Finder sidebar but I just use the current tintColor. Seems to work in my limited testing. At least I can read the text.