简体   繁体   English

停止在UITextView中重复背景图像

[英]Stop Repeating Background Image in UITextView

How do you stop an Image from repeating in an UITextView? 如何阻止图像在UITextView中重复? What I want to achieve is have a UITextView that has text loaded from a .txt file (already works) and loads a preview image (already works) and finally I want the background to display my Logo at the top along with background colors I've made (all in 1 .png file), while when you scroll, the logo will go away and the rest of the background will scroll as well. 我要实现的是有一个UITextView,它具有从.txt文件加载的文本(已经可以使用)并加载预览图像(已经可以使用),最后我希望背景在顶部显示我的徽标以及我的背景颜色。 (在1个.png文件中),滚动时,徽标将消失,背景的其余部分也将滚动。 My problem is that the Image repeats near the end of the text. 我的问题是图像在文本结尾附近重复。 If I make the image larger, my Logo stretches and looks sloppy, I'd like to keep the image at (0,0,480,However high the text is) and still keep the integrity of the logo in tact. 如果我将图像放大,我的徽标会拉伸并显得马虎,我想将图像保持在(0,0,480,但文字高度如何)并仍保持徽标完整性。 I've tried searching the other similar questions but they all seem to want the repeat and I do not. 我尝试搜索其他类似的问题,但它们似乎都想重复,而我不希望重复。 Suggestions? 有什么建议吗?

将UIImageView用作背景图像并将textView的背景设置为透明怎么办?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM