UISegmentedControl backgroundColor not applied on some iOS 26 devices

I’m seeing inconsistent UISegmentedControl background-color behavior on certain devices running iOS 26. The same code works as expected on other devices and iOS versions, but on affected devices the control does not display the assigned backgroundColor.

The issue occurs using standard UIKit colors and does not depend on custom fonts, images, or appearance extensions. Here is a simplified example using only public UIKit APIs:

private let segmentedControl = UISegmentedControl(items: ["Card", "Email"])

private func setupSegmentedControl() {
    segmentedControl.selectedSegmentIndex = 0

    guard let cardIcon = UIImage(
        systemName: "creditcard.fill",
        withConfiguration: UIImage.SymbolConfiguration(
            pointSize: 14,
            weight: .semibold
        )
    ),
    let emailIcon = UIImage(
        systemName: "envelope.fill",
        withConfiguration: UIImage.SymbolConfiguration(
            pointSize: 14,
            weight: .semibold
        )
    ) else {
        return
    }

    segmentedControl.setImage(
        cardIcon,
        forSegmentAt: 0
    )

    segmentedControl.setImage(
        emailIcon,
        forSegmentAt: 1
    )

    segmentedControl.backgroundColor = .systemGray5
    segmentedControl.selectedSegmentTintColor = .systemBlue
    segmentedControl.layer.cornerRadius = 8
    segmentedControl.clipsToBounds = true

    let font = UIFont.systemFont(
        ofSize: 14,
        weight: .medium
    )

    segmentedControl.setTitleTextAttributes(
        [
            .foregroundColor: UIColor.label,
            .font: font
        ],
        for: .normal
    )

    segmentedControl.setTitleTextAttributes(
        [
            .foregroundColor: UIColor.white,
            .font: font
        ],
        for: .selected
    )

    segmentedControl.addTarget(
        self,
        action: #selector(segmentChanged(_:)),
        for: .valueChanged
    )

    view.addSubview(segmentedControl)
}

@objc private func segmentChanged(
    _ sender: UISegmentedControl
) {
    print("Selected segment: \(sender.selectedSegmentIndex)")
}

UISegmentedControl Apple Documentation

Answered by DTS Engineer in 902393022

I’m seeing inconsistent UISegmentedControl background-color behavior on certain devices running iOS 26. The same code works as expected on other devices and iOS versions, but on affected devices the control does not display the assigned backgroundColor.

This is expected behavior from iOS 26, UISegmentedControl now draws its track and selection using the new design instead of a flat color fill.

Please review Adopting Liquid Glass and the WWDC session Build a UIKit app with the new design. They cover the appearance changes to standard controls, including UISegmentedControl.

Use selectedSegmentTintColor to apply color the selected segment.

I’m seeing inconsistent UISegmentedControl background-color behavior on certain devices running iOS 26. The same code works as expected on other devices and iOS versions, but on affected devices the control does not display the assigned backgroundColor.

This is expected behavior from iOS 26, UISegmentedControl now draws its track and selection using the new design instead of a flat color fill.

Please review Adopting Liquid Glass and the WWDC session Build a UIKit app with the new design. They cover the appearance changes to standard controls, including UISegmentedControl.

Use selectedSegmentTintColor to apply color the selected segment.

UISegmentedControl backgroundColor not applied on some iOS 26 devices
 
 
Q