Wrong appearance of decimalPad keyboard in dark mode

Hi. The following code causes UI mismatch on iOS26. Keyboard with type decimalPad and appearance as dark is displayed as popUp with wrong colors. Before iOS26 keyboard was regular with correct color scheme. Please advice either how to make the scheme correct or force to display regular keyboard instead of popup.

class ViewController: UIViewController {
    
    @IBOutlet weak var textField: UITextField!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.

        textField.keyboardType = .decimalPad
        textField.keyboardAppearance = .dark
        view.backgroundColor = .darkGray
    }
}
Answered by DTS Engineer in 879670022

Hello ArtemLyk,

This appears to be an issue and we are now aware of it (FB22146889), but we're not aware of any recommended workaround so far. You could potentially try updating the userInterfaceStyle in the text field's UITraitCollection, but I noticed that using overrideUserInterfaceStyle = .dark did not work.

If you find something that helps you avoid the issue, please share it with the community by posting it here.

Even though we're aware of this issue, we still encourage you to open a bug report, and post the FB number here once you do. The specific info you include your bug report might help our investigation, and filing the bug report you to get notified when it is resolved.

Bug Reporting: How and Why? explains how you can open a bug report.

Thank you for your due diligence,

Richard Yeh  Developer Technical Support

Same issue in SwiftUI while using .keyboardType(.numberPad) in combination with .preferredColorScheme(.dark). I'm afraid it's iOS / iPadOS bug.

Hello ArtemLyk,

Thank you for your question. Can you please confirm if your iPad actually has Dark Mode enabled via Settings? I see that when Dark Mode is off, your focused sample project matches the screenshot you posted. However, when Dark Mode is on, I believe I see your intended design:

@lu-bo, can you likewise please confirm your Dark Mode settings?

Thank you for your patience,

Richard Yeh  Developer Technical Support

Hello @DTS Engineer Dark mode is disabled in system settings of the device. In such case only numberPad or decimalPad keyboards are displayed incorrectly. At the same time numbersAndPunctuation keyboard has expected appearance:

Accepted Answer

Hello ArtemLyk,

This appears to be an issue and we are now aware of it (FB22146889), but we're not aware of any recommended workaround so far. You could potentially try updating the userInterfaceStyle in the text field's UITraitCollection, but I noticed that using overrideUserInterfaceStyle = .dark did not work.

If you find something that helps you avoid the issue, please share it with the community by posting it here.

Even though we're aware of this issue, we still encourage you to open a bug report, and post the FB number here once you do. The specific info you include your bug report might help our investigation, and filing the bug report you to get notified when it is resolved.

Bug Reporting: How and Why? explains how you can open a bug report.

Thank you for your due diligence,

Richard Yeh  Developer Technical Support

Hello @DTS Engineer Thanks you for the response. FB22146889 was submitted by me as well.

It seems there are no working workarounds, setting appearance for the textfield doesn't work either. The only solution for now is to use a different keyboard type. Bug reported - FB22193091

Thank you

Wrong appearance of decimalPad keyboard in dark mode
 
 
Q