Reputation: 1009
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?
Upvotes: 23
Views: 16569
Reputation: 3232
For those who are looking for the simple answer please see the screenshot. Select TextView, change the Background property in the Attributes Inspector to "Clear Color"
Upvotes: 0
Reputation: 221
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.
Upvotes: 3
Reputation: 47
If you are in the Interface Builder: Press cmd+1 to get to the Attributes Instructor pane
Scroll down to the section "View" And click at Background the two Arrows - there u can choose now between several kinds of colorization. In this case "Clear Color"
Upvotes: 0
Reputation: 47104
Change background color, and use opacity slider to make it fully transparent.
Programmatically:
textView.backgroundColor = [UIColor clearColor];
Upvotes: 55