Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UItextview Transparent Color IOS

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

enter image description here

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?

like image 902
u.gen Avatar asked Jun 17 '12 09:06

u.gen


1 Answers

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).

like image 108
somedev Avatar answered Sep 28 '22 05:09

somedev