Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the text of UITextField to appear with First letter Capital in iPhone

I have a text box and I am only interested in capitalizing the first letter, So how to do that in iPhone UITextField.

like image 983
rkb Avatar asked Jul 25 '09 00:07

rkb


People also ask

How do I make the first letter capital automatically?

Or use Word's keyboard shortcut, Shift + F3 on Windows or fn + Shift + F3 for Mac, to change selected text between lowercase, UPPERCASE or capitalizing each word.


1 Answers

try this:

tf = [[UITextField alloc] init]; tf.autocapitalizationType = UITextAutocapitalizationTypeSentences; 

or set this property in the properties inspector in Interface Builder

like image 176
ennuikiller Avatar answered Oct 03 '22 09:10

ennuikiller