-2

Hello : please I have a UIButton with a specific image when pressing the button I want to change another image the same size only different color

my question is what is the code to use thanks

Erinson
  • 78
  • 8

1 Answers1

0

UIButton has both a image and backgroundImage. Set the image to the image you want when the button is not pressed, and the backgroundImage to what you want when the button is pressed.

nhgrif
  • 61,578
  • 25
  • 134
  • 173