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?
Yes, changing the
alphafor theUITextVieworUITextFieldaffects the entire control. If you want to adjust the alpha of the background, specify thealphaof theUIColorfor thebackgroundColor.For example, for a translucent red background you could do:
or