用数据预填充 UITextView?
我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够通过设置 UITextView 的
text
属性来更改其内容。例如,在视图控制器中只需执行以下操作:如果视图控制器中没有 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: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.