TextField使用numberPad类型键盘没有收起的按键
1. 通过window收起键盘(已过期)
UIApplication.shared.keyWindow?.endEditing(true)
2. 使用UIResponder
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
TextField使用numberPad类型键盘没有收起的按键
UIApplication.shared.keyWindow?.endEditing(true)
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)