Reputation: 65
here's my problem: Basically i have three layers:
1st: backgroung image (The blue moon one)
2nd: The UIView with the Alpha value in 0.4 (transparency)
3rd: The Image UIImageView inside UIView (Couch, arrow and TV).
As you can see below in the photo.
In the Interface Builder you can see the 3rd layer in solid color, the kind of effect i want. But in the simulator, we see the transparency effect in this layer.
Does anybody know why does it happen? Is there another way to make the 3rd layer solid colorized?
Upvotes: 0
Views: 1343
Reputation: 632
By setting alpha property on the whole view, it affects all subviews, e.g. your couch and TV pictures. One simple workaround to achieve what you want would be to set view's alpha to 1, making it 'solid', but to fill it with a transparent UIColor.
UIView view = new UIView();
view.Alpha = 1.0f;
view.BackgroundColor = UIColor.FromWhiteAlpha(1.0f, 0.4f);
view.AddSubview(new UIImage("couch.png"));
...
HTH,
Upvotes: 1