【问题标题】:Adding text to UITextView向 UITextView 添加文本
【发布时间】:2011-12-27 15:30:41
【问题描述】:

我有一个UITextView,我需要在“点形式”中添加一些文本。像这样的:

 - > text 1

 - > text 2 

 - > text 3 

 - > text 4

我的代码:

UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)];
[self.view addSubView:textView];

如果我有一个像text 1 text 2 text 3 text 4 这样的字符串,我如何在 UITextView 中用这些项目符号显示它?

【问题讨论】:

标签: iphone objective-c cocoa-touch


【解决方案1】:

我认为你可以使用

   textview.text = yourString;
   [textview.text stringByAddingPercentEscapesUsingEncoding:'TheRightTextEndoder'];

你应该放置一个正确的文本编码以便显示bullit

【讨论】:

  • 什么是“TheRightTextEndoder”?它有什么作用?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多