UITextView中特定行的内容 [英] Content of a specific line in UITextView

查看:95
本文介绍了UITextView中特定行的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以提取UITextView中特定行的字符串内容?感谢。

Is it possible to extract the string content of a specific line in a UITextView? Thanks.

推荐答案

在UITextView中查找行的内容只能通过使用sizeWithFont 方法。它可以为静态页面,但不适合出现在scrollview或tableview中的内容。

Finding the content of a line in UITextView can only be solved through an extremely expensive process of iteration using the "sizeWithFont" methods. It could be done for a static page, but is not suitable for content that appears in a scrollview or tableview.

这篇关于UITextView中特定行的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆