//隐藏键盘 当前视图上有多个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];
//隐藏键盘 当前视图上有多个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];