viratpuar
viratpuar

Reputation: 554

How to set transparent background color in UIImageView

I want to know how to set Transparent background Color in iOS. I have searched everywhere but I can't find anything. I want to set transparent background color like this:

Image

Upvotes: 2

Views: 4550

Answers (2)

Birendra
Birendra

Reputation: 625

try this one it will works :-

Your_ImageView.opaque = NO;

Your_ImageView.alpha = 0.3;

Upvotes: 1

Sergey Kalinichenko
Sergey Kalinichenko

Reputation: 726579

Set opaque to NO and alpha to 0.3, like this:

UIImageView *myImageView = ...
myImageView.opaque = NO;
myImageView.alpha = 0.3;

Upvotes: 3

Related Questions