How to make an image without a background in Xcode

My current method for putting an image on a view controller is to place an image view and select the image I want to be displayed. How can I make it so that this image does not have a background? Basically, I want to make a "png" type image on my view controller.

You can see in the image provided how the background of my image is a white box. I want an image basically to conform to the shape of the actual picture and not have a boxy background. I apologize as I am sure this info is available online, but thus far I have been unlucky. Thanks so much for any help or guidance.


You can control the background color and opacity of your UIImageView that is holding your image by adding this row

imgView.backgroundColor = UIColor(red: 33.0, green: 33.0, blue: 33.0, alpha: 0.5)

And if you want more transparency, you could change the alpha value. I don´t think it´s possible to trim an image background color if the image already has a background.

In your case wouldn't it just be easier for you to remove the backgrounds of your images (in Photoshop etc...) and then add them to your views? In that case you would have the image without a background color and then you don´t have to do anything with the background color of your UIImageView.

Need Your Help

How to Get Apache to Accept a Self Signed Cert Made By Java's KeyTool

php macos apache symfony ssl

Apache/PHP/Symphony is being used in my middle layer for authentication and routing. A request comes through on http then if the request authenticates the person making the request is authorized then

Basic rules engine architecture

.net xml linq-to-xml dsl

We are currently developing a project in .NET that involves analyzing XML documents against a set of user defined rules. Here is an example: