Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-03-2009, 05: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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,888
Threads: 38,671
Posts: 169,755
Top Poster: smasher (2,553)
Welcome to our newest member, jackcohen
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:12 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.