Reputation: 4914
I want to set my UItextview s color transparent but not completely transparent. I want little bit gray or black at the background exactly like the picture
I am using this code right now
_textView.backgroundColor = [UIColor clearColor];
how can I make it transparent like in the picture above? Any example Code?
Upvotes: 9
Views: 9213
Reputation: 2115
Does this do what you want? (You may need to experiment with the values).
_textView.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.5];
Upvotes: 4
Reputation: 801
You should use something like this:
_textView.backgroundColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.5];
where alpha - parameter for transparent ( 50% in example).
Upvotes: 6