How do I force characters input into a textbox on the iPhone to upper case?
To Automatically input uppercase in textfield:
Case 1: Add UITextDelegate protocol and implement the following method
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
textField.text = [textField.text stringByReplacingCharactersInRange:range withString:[string capitalizedString]];
return NO;
}
Case 2:Set the following parameter in the ViewDidLoad() method in your view controller. Although in this case the user can turnoff the caps button on the keyboard.
urTextFieldName.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters;