I want to customize the cancel button inside the UISearchBar
, that appears when the user type a text, to clear the text, see the image, I want to change the tint color of the button inside the red square NOT the button with "cancel" text
What I have tried :
[[UIButton appearanceWhenContainedIn:[UISearchBar class], nil] setTintColor:[UIColor redColor]];
but it changes the color of the button with the text "cancel" not the icon to clear the text inside the textfield
it's not a duplicate question because I want to change the tint of the default clear image, NOT using a custom image, something like that :
How to change the tint color of the clear button on a UITextField
but for UISearchBar