modalviewcontroller 是否会退出父视图子视图的 FirstResponder ?
为了识别用户是否通过触摸另一个文本字段而不是点击返回按钮来从编辑一个文本字段跳转到另一个文本字段,我实现了一种通过事件“编辑确实结束”调用的方法。 我读到,当文本字段退出第一响应者时,也会发生此事件。
现在,每当用户有多项选择时,我都会显示带有选择器的模态视图。 每当有多个选择并且用户切换文本字段而不点击返回时,我都会遇到问题,此方法被调用两次,我不知道为什么!
modalviewcontroller 在呈现时是否有可能放弃parentView 的所有FirstResponder?
in order to recognize if a user jumps from editing one textField to another by just touching another one instead of hitting the return button i implemented a method which gets called with the event "Editing did end".
i read this event also happens when, in this case a textField resignsFirstResponder.
Now whenever the user hase a multiple choice I present a modal View with a picker.
I have the problem whenever there is a multiple choice and the user switches textFields without hitting return this method gets called twice and I don know why!
is it possible that the modalviewcontroller resigns all FirstResponder of the parentView when it gets presented ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
说
你可以在展示你的控制器之前
。但我有一种感觉,如果我能清楚地理解你的问题,可能会有更好的方法来解决这个问题。
you can say
before presenting your controller.
but i have a feeling there could be a better way to solve this if i can understand your problem clearly.