I used custom button with Image. In normally , When we tapping button , the color of button has been changed.
When i tapping that custom button , i want to change image from custom button.
How can i change it?
Thanks.
assuming this is a standard UIButton, you can do the following when initializing the button:
[btnObj setImage:[UIImage imageNamed:@"imgName.png"] forState:UIControlStateHighlighted];
or for the Background image:
[btnObj setBackgroundImage:[UIImage imageNamed:@"imgName.png"] forState:UIControlStateHighlighted];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With