How do I create a transparent UITextField?

Objective-C

If you only want to make the background (rather than the whole UITextView) transparent, I believe you should be do this via the backgroundColor property it inherits from UIView.

As such...

[yourTextView setBackgroundColor:[UIColor clearColor]];

...should hopefully do the trick.

If however, you want to make the whole UITextView transparent, the alpha property @taskinoor mentions is perfect.


You can set the alpha of text view to any desired value.

myTextView.alpha = 0.5;    // 50% transparent