Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear Background color on UIImageView?

hello i have a UIimageView with a PNG image that has round corners, image sits fine the only problem it has is that i can see the UIImage Corners with a white background, how can I make the background clear and transparent.

like image 680
Silent Avatar asked Apr 17 '10 00:04

Silent


1 Answers

Try this:

imageView.backgroundColor = [UIColor clearColor];
imageView.opaque = NO;

You can achieve the same thing in IB by making the 'Background' a color with 0% opacity, and unticking the 'Opaque' checkbox.

like image 134
Nick Forge Avatar answered Oct 27 '22 18:10

Nick Forge