简体   繁体   English

iPhone UITextView位置相对

[英]iPhone UITextView position relative

i got a news page (a view) at my application and it has news' image and text. 我的应用程序有一个新闻页面(一个视图),其中包含新闻的图像和文本。 Text is in a UITextView and i want my text to start next to image and when the image ends continue from the down of the image, like the text is surrounding the image. 文本位于UITextView中,我希望文本从图像旁边开始,并且当图像结束时,从图像的下方继续,就像文本围绕图像一样。 i tried autoResizingMask but as i ve understood it is for the relations between subview and superview so it didnt work. 我尝试了autoResizingMask,但是据我所知,它是针对子视图和超级视图之间的关系的,因此它没有用。 Is there any way to do it ? 有什么办法吗?

Thanx in advance 提前感谢

AFAIK, UITextView doesn't support wrapping around other views. AFAIK, UITextView不支持环绕其他视图。 You can: 您可以:

  1. Split the text into two UITextView s 将文本分为两个UITextView
  2. Use a UIWebView 使用UIWebView
  3. Do your own drawing using NSString 's drawInRect or drawAtPoint methods. 使用NSStringdrawInRectdrawAtPoint方法绘制自己的图形。

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

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