Swift how to resign first responder on all uiTextfield
Or just use a more global approach. (Swift 3.0)
UIApplication.shared.sendAction(#selector(UIApplication.resignFirstResponder), to: nil, from: nil, for: nil);
This will dismiss any active field as it resigns the current first responder. Good luck coding!
A simpler approach would by to end editing on the UIView containing the UITextFields by saying:
view.endEditing(true)