Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

autocapitalizationType Not working

I am trying to keep the first charactor of textFiled "Capital" by setting autocapitalizationType but it is not working. below is snapshot of src code for same.

UITextField* returnTextField = [[UITextField alloc] initWithFrame:frame];
returnTextField.autocorrectionType = UITextAutocorrectionTypeNo;
returnTextField.autocapitalizationType = UITextAutocapitalizationTypeWords;
returnTextField.keyboardType = UIKeyboardTypeEmailAddress;
returnTextField.returnKeyType = UIReturnKeyGo;
returnTextField.clearButtonMode = UITextFieldViewModeWhileEditing;  
returnTextField.delegate = self;

Thanks,

Sagar

like image 807
Sagar... Avatar asked Dec 15 '10 11:12

Sagar...


1 Answers

If you type in the text field using your hardware keyboard, it ignores auto capitalization. However if you use the keypad on the simulator screen, it should auto-capitalize the words.

like image 84
mvb Avatar answered Oct 25 '22 01:10

mvb