模态视图控制器 UITextView 多个文本字段的子视图
当用户单击文本字段时,我会推送一个包含单个 UITextView 的模式视图控制器。我希望用户能够在该 UITextView 中输入文本,使用保存按钮关闭模式视图,并使该文本显示在原始文本字段中。如果只有一个文本字段,这并不难。
但是,我想对许多文本字段和只有一个模式 UITextView 视图执行此操作,这可能吗?更具体地说,如果不为每个按下的 TextField 创建子类,这是否可能?如何指示在 UITextView 中输入的文本仅存储在触摸以推送模式 UITextView 的任何文本字段中?
非常感谢。 埃里克
when a user clicks on a textField, I push a modal view controller that contains a single UITextView. I would like the user to be able to enter text in that UITextView, dismiss the modal view with a save button and have that text appear in the original textField. This is not hard if there is only one textField.
However, I would like to do this with many textfields and only one modal UITextView view, is this possible? More specifically, is this possible without creating a subclass for each TextField pressed? How do I inidicate that the text entered in the UITextView is to only be stored in whatever textField was touched to push modal UITextView?
Many thanks.
Eric
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于那些想知道的人,您可以为每个文本字段的编辑方法设置标准用户默认值。我花了一段时间才弄清楚这个问题。
For those of you wondering, you set a standard user default to each textField's is editing method. It took me a while to figure this one out.