Adjust the textField:shouldChangeCharactersInRange:replacementString: for backspace key.