-
-
Save ruandao/9429941 to your computer and use it in GitHub Desktop.
让textview 失去焦点, 处理方法是, 当点击空白地方的时候(tap事件),让keyboard 消失
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 然后鉴于,一个页面里面可能有多个输入源, so 遍历下面 | |
for (UIView *view in self.view.subviews) { | |
if ([view isFirstResponder]){ | |
[view resignFirstResponder]; | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment