How to change the colors of a segment in a UISegmentedControl in iOS 13?

A UISegmentedControl has a new appearance in iOS 13 and existing code to alter the colors of the segmented control no longer work as they did. Prior to iOS 13 you could set the tintColor and that ...