Mateusz Budnik
Posted on July 6, 2021
To change default clear button icon, you have to create binding to your text field and then pass the following lines of code:
if let clearButton = someTextField.value(forKeyPath: "_clearButton") as? UIButton {
clearButton.setImage(UIImage(named:"image_name"), for: .normal)
}
To change size of the icon you can upload to the project the image with the appropriate size.
💖 💪 🙅 🚩
Mateusz Budnik
Posted on July 6, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.