UITextView 中的格式设置

发布于 2024-08-30 02:56:22 字数 178 浏览 2 评论 0原文

我在格式化 UITextView 时遇到问题。我的应用程序提取 XML,将其中一些保存到 string 中,然后在 UITextView 中显示文本。

它会理解您是否在其中输入了一个回车符,并且它会开始一个新行。但我想把段落放在那里,知道如何在不执行多个 UITextView 的情况下传递该信息吗?

谢谢:)

im having problems with formatting for a UITextView. my app pulls in XML, saves some of it to a string , and then displays the text in a UITextView.

it understands if you put a return in there, and it starts a new line. but i want to put paragraphs in there, any idea how i can pass that information without doing multiple UITextViews

Thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

二货你真萌 2024-09-06 02:56:22

如果您要将 XML 内容转换为文本,那么使用 UIWebView 和使用 html 的格式可能会更容易。

如果您想要完全控制格式,那么您需要转向使用 Core Text (3.2/iPad)。

If you are converting to text from XML content, then it is probably easier to use a UIWebView and format using html.

If you want total control of formatting, then you need to move to using Core Text (3.2/iPad).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文