Reputation: 281
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 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?
Upvotes: 0
Views: 4162
Reputation: 15510
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
.
Upvotes: 3
Reputation: 2469
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.
Upvotes: 0
Reputation: 2241
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;
Upvotes: 0
Reputation: 6448
try set:
yourTextView.alpha = 0.6 // or any positive float value < 1.00
Upvotes: 2