Why has my image lost its transparency?
I'm creating a xib file in which there is a black marbled background displayed using a UIImageView and several UIButtons placed over it with images within them. The images are transparent with the exception of a dotted white line skirting their perimeter. I am using pngs for my images and I have tried setting them as both the image and background image. How can I restore the alpha channel within these images and place them within a UIButton?
How the image should look with transparency against a black marbled background.
How the image looks at present.
You may need to set the UIButton type to UIButtonTypeCustom and not Rounded Rect
Try to add quartzCore framework in your framework folder, then import the header:
#import < QuartzCore/QuartzCore.h >
and set the image maskToBounds yes and set in corner if you want.