用数据预填充 UITextView?

发布于 2024-08-17 19:28:57 字数 113 浏览 2 评论 0原文

我有一个 UIText 视图,需要用可以从 currentItem.link 获取的链接填充该视图。但我似乎无法弄清楚如何使用链接填充文本视图。

我假设您必须使用某种 IBAction 加载视图?

I have a UIText View that I need to populate with a link that can be gained from currentItem.link. But I can't seem to work out how to populate the text view with the link.

I'm assuming you have to load the view with some sort of IBAction?

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

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

发布评论

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

评论(1

眼泪都笑了 2024-08-24 19:28:57

您应该能够通过设置 UITextView 的 text 属性来更改其内容。例如,在视图控制器中只需执行以下操作:

self.myTextView.text = [NSString ... ];

如果视图控制器中没有 myTextView 属性,请将其声明为 IBOutlet 作为属性,并将文本视图连接到 Interface Builder 中的文本视图。

You should be able to change the contents of a UITextView by setting its text property. For example, in your view controller just do:

self.myTextView.text = [NSString ... ];

If there's no myTextView property in your view controller, declare an IBOutlet for it as a property and connect the text view to that in Interface Builder.

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