How to create a gray overlay view on a UIButton that contain an image, but to make the overlay to be shown only on the image itself, not on the whole button so just the image will be gray color.
Is it possible?
This is the button as it is:

This is with overlay:

This is how I want it to be:

Thanks!
Just set the image you want for the highlighted state. You can do this in a XIB or on your storyboard by setting the state to “Highlighted”:
and then setting the image:
OR
Do it through code like this:
The image can be quickly duplicated and converted to black-and-white with Photoshop or GIMP, etc. Changing the image to black-and-white programmatically is way more work than it’s worth.