Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-03-2009, 06:53 PM   #1 (permalink)
JohnnyFlash
New Member
 
Join Date: Feb 2009
Posts: 2
Default Wrong UIKeyboardType

I have the following code for two text fields. The idea is that when you click the Next button on the first field it will move the cursor to the second field.

Code:
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
	if( textField == firstField )
	{
		// Move selection to next field
		[self.firstField endEditing:YES];
		[self.secondField becomeFirstResponder];
	}
}
All of this works as expected. However, I have recently noticed that when it switches to the second field, the keybord type changes away from what I have setup in the .xib. It works correctly when I click directly on the second field. So, I figured if I added the code below I could force the keyboard type. Unfortunately, this does not work either.

Code:
- (BOOL)textFieldDidBeginEditing:(UITextField *)textField
{
	[textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation];
	
	return YES;
}
Any ideas would be apreciated.

-Jerry
JohnnyFlash is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,721
Threads: 89,177
Posts: 380,491
Top Poster: BrianSlick (7,122)
Welcome to our newest member, ItalianFoods
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:26 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.