quano
quano

Reputation: 19102

Clear button color on text field

How do you change the clear button color of a UITextField?

Upvotes: 6

Views: 2460

Answers (1)

bstahlhood
bstahlhood

Reputation: 2006

You want to use rightView and rightViewMode. Use a button and add an image that is a red clear button. Then add your target and perform your logic.

rightViewRectForBounds will also return the size of the button for the rightView.

Upvotes: 4

Related Questions