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.
UISegmentedControl
Prior to
Swift version of @Ilahi Charfeddine answer:
if #available(iOS 13.0, *) { segmentedControl.setTitleTextAttributes([.foregroundColor: UIColor.white], for: .selected) segmentedControl.selectedSegmentTintColor = UIColor.blue } else { segmentedControl.tintColor = UIColor.blue }