For the dark background use:
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
Read to find more information about UITextInputTraits (use UIKeyboardAppearanceDark at iOS 7+).
For the dark background use:
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
Read to find more information about UITextInputTraits (use UIKeyboardAppearanceDark at iOS 7+).