Reputation: 1889
In my program, I have added a UIImageView as a subview of a UIView that has been declared in an xib file. This subview (which contains an image that is a PNG file) should have a transparent background, but the background becomes white when it is displayed on the screen. Is this normal behavior? Is there something I must change to allow the image to display properly? Any help is appreciated.
Upvotes: 1
Views: 390
Reputation: 10775
Each view which should have a transparent background has to be set the background color with theUIView.backgroundcolor = [UIColor clearColor]
. In your case you should call this on you image view.
Upvotes: 1
Reputation: 14796
Check the background color of your UIImageView and its container UIView.
Upvotes: 3