I'm having a strange issue with my modal view. The modal view asks for some user input so the keyboard pops on. When I click the cancel button to dismiss while the keyboard is still active they both dismiss in an animated fashion but the modal jerks to the right first, very strange. What would be my best course of action here? Would it be to disable my cancel modal button when the keyboard is active? If so how do I go about detecting the presents of the keyboard?
我的模态视图有一个奇怪的问题。模态视图要求输入一些用户输入,以便弹出键盘。当我在键盘仍处于活动状态时单击取消按钮以解除时,它们都以动画方式解除,但模式首先向右猛拉,非常奇怪。这里我最好的做法是什么?当键盘处于活动状态时,是否禁用取消模式按钮?如果是这样,我该如何检测键盘的礼物?
Thanks!
谢谢!
1 个解决方案
#1
0
You can detect the presence of keyboard using NSNotification Class. Hope this helps
您可以使用NSNotification Class检测键盘的存在。希望这可以帮助
#1
0
You can detect the presence of keyboard using NSNotification Class. Hope this helps
您可以使用NSNotification Class检测键盘的存在。希望这可以帮助