UIKeyboard first character is capital in simulator but not in device?

I am creating ViewBased Project, Just in ViewController's ViewDidLoad, I am writting the following code

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {

UITextField *name_textField = [[UITextField alloc] initWithFrame:CGRectMake(110, 21, 200, 30)];
name_textField.delegate=self;
name_textField.keyboardType = UIKeyboardTypeASCIICapable;
name_textField.autocorrectionType = UITextAutocorrectionTypeNo;
[name_textField setBorderStyle:UITextBorderStyleRoundedRect];
[name_textField resignFirstResponder];
[self.view addSubview:name_textField];

[super viewDidLoad];
}

As I do run on simulator, it will show first character capital in textField and also shift key is press, but as I run it on device (iPod Touch 4g, iOS 5), it is not doing any capitalization.

It is strange behavior, can any one tell me reasons and how to solve it?

Answers


Try to add this after initialization:

name_textField.autocapitalizationType = UITextAutocapitalizationTypeSentences;

It's very likely that the "Auto-Capitalization" option is turned off on that device. You can find that option in Settings > General > Keyboard.


Need Your Help

Notify running Windows app when line is inserted in sql table

sql .net sql-server triggers notifications

I need to have a Windows application (that I am writing) somehow get information that a new record has been added to a certain SQL table. The SQL Server is MS SQL Server 2008, and the Windows app ...

How can i save .txt file at desired location using JFileChooser

java swing file-io jfilechooser java-io

Using following code i can store program.txt in a working project folder, but how can I use JFileChooser or any other option to save file at a selected location?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.