I'm facing a problem while trying to enable the clear button on UITextField. I have added like this:
if let clearButton = searchTextField.value(forKeyPath: "_clearButton") as? UIButton { //KV
    clearButton.tintColor = .nextWhite()
    clearButton.backgroundColor = .nextWhite()
    clearButton.setImage(UIImage(named: R.image.iconCloseRounded.name), for: .normal)
    clearButton.isHidden = false
The debug 3d image is attached on the link below.
Please, could anyone see where I'm adding this wrong that it's not being shown?


 
     
    