I want the keyboard for the UITextfield to only have a-z, no numbers, no special characters (!@$!@$@!#), and no caps. Basicly I am going for a keyboard with only the alphabet.>
Swift 4.2 Code Allow only alphabets with allowing backspace if the user wants to remove wrong character
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.rangeOfCharacter(from: .letters) != nil || string == ""{
return true
}else {
return false
}
}