Objective-c – Clear Background color on UIImageView

iphoneobjective c

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.

Best Answer

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.