Skip to content

Compatible for iOS 13 - UISegmentControl #41

@mario1in

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
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions