[英]Set `UIImage` to `UITextview.textColor`
What i want is to set UIImage
to UITextview.textColor
. 我想要的是将UIImage
设置为UITextview.textColor
。
So is that possible that : If i set clear Color to textColor
and set image to UITextView's
background. 这是否有可能:如果我将clear Color设置为textColor
并将image设置为UITextView's
背景。 Now i want to set clear color to UITextview
except string area so that image is set to text background.?? 现在我想为除字符串区域之外的UITextview
设置清晰的颜色,以便将图像设置为文本背景。
使用这个方法
[UIColor colorWithPatternImage:[UIImage imageNamed:@"Something.png"]]
You can set an Image as the backgroundColor
of the UITextView
like this: 您可以像这样将Image设置为UITextView
的backgroundColor
:
txtView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ImageName.png"]];
All the best!!! 祝一切顺利!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.