I want to program a custom keyboard for a textfield. The background of the keyboard should be transparent, but when I try to set the alpha of the keyboardView, the alpha of its subviews changes too. How can I change the keyboard's alpha only? I don't want to set it to [UIColor clearColor].
keyboardView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
keyboardView.alpha = 0.2;
keyboardView.backgroundColor = [[UIColor clearColor] colorWithAlphaComponent];
Changing a view's alpha alters the view and all it's subviews.
If you want the non-drawn parts of your view to show what's underneath, set the view's opaque flag to NO and then set the background color to clearColor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With