Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My View is transparent, how can I make the components not transparent

I have a view controller with a couple of container views. These views are .8 alpha, so they are a little transparent. Each view has a few text-fields and some other UI (switches, segmented controls etc).
Now, as I load this I notice everything has that 0.8 alpha transparency. Is there a way to remove the transparency from the objects that are inside the view? I tried setting a background individually to each textbox with no alpha component (via storyboard) but they still retain that semi-transparency from their parent view.

like image 476
dvd.Void Avatar asked Dec 06 '25 23:12

dvd.Void


1 Answers

Give opacity 80% to background color and not change alpha of your parent view.

If you change alpha of your parent view it affects to all your child views. So, all your child view also looks transparent. But if you change background color opacity of your parent view it looks transparent and not affects to child views.

enter image description here

Example

enter image description here

like image 173
Khushbu Avatar answered Dec 08 '25 13:12

Khushbu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!