Google News
logo
IOS - Interview Questions
How to manage the image transparency in iOS application?
If the size of the image is smaller than the imageview, than any transparency in the image leads to the background display through since the image is composited onto the imageview background and then onto the rest of the available image.
 
* If the image view's isOpaque property is true, the image's pixels are composited on top of the image view's background color, and the alpha property of the image view is ignored.
 
* If the image view's isOpaque property is false, the alpha value of each pixel is multiplied by the image view's alpha value, with the resulting value becoming the actual transparency value for that pixel. If the image does not have an alpha channel, the alpha value of each pixel is assumed to be 1.0.
Advertisement