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
}
}
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