HomeiOS DevelopmentUITextField inputAccessoryView clear background with customized inputView

UITextField inputAccessoryView clear background with customized inputView


I am attempting to make use of UIPickerView because the textfield’s inputView and in addition add UIToolBar because the textfield’s inputAccessoryView.

In iOS 26, it provides some bizarre clear background (like a liquid glass impact, I assume) beneath the toolbar.
I wish to protect the identical look because it had beforehand.

Please see the instance code beneath with hooked up photographs:

let keyboardToolbar = UIToolbar(body: CGRect(origin: .zero, measurement: CGSize(width: 100, peak: 44.0)))

let doneBarButton = UIBarButtonItem()
        doneBarButton.title = "Finished"
        
if #out there(iOS 26.0, *) {
  doneBarButton.hidesSharedBackground = true
}

keyboardToolbar.gadgets = [doneBarButton]
textField.inputAccessoryView = keyboardToolbar
        
let picker = UIPickerView()
picker.backgroundColor = .white
textField.inputView = picker

iOS 18:

UITextField inputAccessoryView clear background with customized inputView

iOS 26:

iOS 26

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments