Skip to content

Compatible for iOS 13 - UISegmentControl #41

Description

@mario1in

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
 }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions