0

When I click on Share button. Open Share_view. and its alpha 0.5 but I am add another view on Share view.

But I want to this view alpha 1.0 and its not transparent I want to see full white.

See my Image

I had try this, but this is not working at all:

[Detail_view setBackgroundColor:[[UIColor White] colorWithAlphaComponent:1.0]];
winhowes
  • 7,845
  • 5
  • 28
  • 39

1 Answers1

0

As far as I understand, you are adding Detail_view on Share_view, hence Share_view is the parent for your Detail_view.

Solution - Make Detail_view a subview of self.view, i.e

[self.view addSubview:Detail_view];

If you want Detail_view on Share_view, you can do this:

Don't set the alpha directly on the parent view. Instead use

[Share_view setBackgroundColor:[[UIColor whiteColor] colorWithAlphaComponent:0.5]];

Now any child view can have its own color and will NOT be transparent.

iOS Geek
  • 4,825
  • 1
  • 9
  • 30