- 方法一:
- //隐藏键盘 当前视图上有多个uitextfield
- for(UIView *view in [self.view subviews])
- {
- if(view is kindofclass:[UITextField Class])
- {
- [view resignfirstrespond];
- }
- }
- 方法二:
- 直接用
- [self.view endEditing:NO]
- 方法三
- [[[UIApplication sharedApplication] keyWindow] endEditing:YES];
复制代码 |
|