There is now a selectedSegmentTintColor on UISegmentedControl. If you want to change the color of the selected segment, you should use selectedSegmentTintColor on iOS 13. setTintColor will not work.
eg:
if #available(iOS 13.0, *) {
segmentControl.selectedSegmentTintColor = UIColor.white
segmentControl.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.black], for: .normal)
} else {
tabBar.tintColor = UIColor.white
}