[英]how to highlight text in uitextview in iphone
Can any one help me how to highlight text in a UITextView
. 谁能帮我如何在
UITextView
突出显示文本。 The text is coming from sqlite
. 文本来自
sqlite
。 I have implemented a search with UISearchBar
. 我已经使用
UISearchBar
实现了搜索。 I need to highlight texts related the search result. 我需要突出显示与搜索结果相关的文本。
The only possible solution is use Core Text Framework . 唯一可能的解决方案是使用Core Text Framework 。 It is very powerful but it require some knowledge to use.
它非常强大,但是需要一些知识才能使用。
There is no other way to do this. 没有其他方法可以做到这一点。
There is other way for iOS 7 and up. iOS 7及更高版本还有其他方法。 It's by using TextKit framework.
通过使用TextKit框架。 Simple tutorial with examples can be found here: http://www.objc.io/issue-5/getting-to-know-textkit.html
可在此处找到带有示例的简单教程: http : //www.objc.io/issue-5/getting-to-know-textkit.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.