Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

transparent UITextView

Tags:

iphone

How do I make a UITextView transparent? I built the view in Interface Builder and placed a UITextView into it and it covers the background.

Any ideas?

like image 570
Matthew Pateman Avatar asked Aug 06 '10 23:08

Matthew Pateman


3 Answers

Change background color, and use opacity slider to make it fully transparent.

Programmatically:

textView.backgroundColor = [UIColor clearColor];
like image 171
mvds Avatar answered Nov 01 '22 06:11

mvds


Up to iOS 4.3 You had to do the Interface Builder version of setting the background opacity. But as of iOS 5, you can set the backgroundColor and it will work. Just keep in mind when making apps for older OS versions.

like image 39
Darkin Avatar answered Nov 01 '22 06:11

Darkin


In Xcode 4 use interface builder and choose Background as Default

like image 35
HotJard Avatar answered Nov 01 '22 07:11

HotJard