For a UITextView or UITextField, when the alpha value is changed, it seems to change the text as well. Is that true?
Is there a way to change the alpha on just the background and not effect the text?
For a UITextView or UITextField, when the alpha value is changed, it seems to change the text as well. Is that true?
Is there a way to change the alpha on just the background and not effect the text?
Copyright © 2021 Jogjafile Inc.
Yes, changing the
alpha
for theUITextView
orUITextField
affects the entire control. If you want to adjust the alpha of the background, specify thealpha
of theUIColor
for thebackgroundColor
.For example, for a translucent red background you could do:
or