如何在UITextView中加粗文本? [英] How to bold text in UITextView?
问题描述
可能重复:
UITextView带有字体名和粗体的格式
我正在尝试 UI UITextView 的所选文本.我不想在我的应用程序中使用 UIWebView
.
I am trying to Bold selected text of UITextView
.I don't want to use UIWebView
in my application.
如何在 UITextView
中以编程方式进行此操作??
How can I do that programmatically in UITextView
????
推荐答案
我遇到了类似的问题.根据文档以及Google缺乏答案的说法,我怀疑是否存在解决方案,因为UITextView的所有文本都只有一种格式设置.对于UILabels和UITextView来说,全部还是全部.我看到它的唯一方法是使用UIWebView,它为您提供了样式化视图中各个单词和文本的更多自由.祝你好运.:)
I was facing a similar issue. According to the documentation and the lack of answers from google, I doubt there's a solution as UITextView has only one format setting for all its text. It's all or nothing for UILabels and UITextView. The only way I see it, is to use UIWebView which gives you more freedom of styling individual words and text in the view. Good luck. :)
这篇关于如何在UITextView中加粗文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!