How to "turn off" transparency inheritance from UIView to controls inside the view in IB?

247 views Asked by At

I have a UIView in Interface builder (Xcode 4.1)that has its alpha set to 0.1 . On top of that view, there are some UIbutton objects. These buttons are children of that view, not simple positioned on top of it - this I clearly see in the object explorer. The problem is, those buttons inherit the alpha settings from their parent view. How can I turn this alpha inheritance off?

1

There are 1 answers

0
AudioBubble On

Old question, I know. I was just hoping for the same (although it does not make much sense) and tripped over this. No, it's not possible. The alpha value is always inherited from the parent value, overall transparency of the child view is a combination of own and parent's alpha.

I'm not sure but there should not be any problems caused by placing the buttons on top of the 'container' view instead of inside it. If you absolutely need a common handle for them you can wrap everything in e.g. another UIView.