How to change text color to transparent in UITextView
I want to change the text color in UITextView with transparent. From many forum, we just set the text color with clear color. When I set 开发者_Python百科text color in XIB with clear color, the text color doesn't change to transparent but change to black. But when i set with othe color, the text color change to the color I choose. Any body can help fix my problem?
Try this:
[[textView.subviews objectAtIndex:1] setHidden:YES];
This should make the text invisible but still allow you to type and use all other features of the UITextView
.
try set:
yourTextView.alpha = 0.6 // or any positive float value < 1.00
you can change your text color alpha value:
yourTextView.textColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
UPDATE::
myTextView.backgroundColor = [UIColor clearColor];
myTextView.alpha = 0.5;
What about pseudo-transparency? Set the text-color to a color which is between the opaque text-color and the background-color of your text-view.
精彩评论