textfield.keyboardAppearance = UIKeyboardAppearanceDark;
in Swift 3:
textfield.keyboardAppearance = UIKeyboardAppearance.dark
For anyone else that finds this question from google, you can also make the keyboard dark from the storyboard as well.