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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-27-2009, 09:01 PM   #1 (permalink)
vja
Registered Member
 
Join Date: Jan 2009
Location: Izhevsk, Russia
Age: 27
Posts: 41
Send a message via Skype™ to vja
Default UITextField and only english keyboard

Hey, all!

I am using in game my own ttf font with only english symbols, and when user typing his name in scores, I want to show it with my font, but got some troubles with non-english symbols (hehe, space symbols)

Is there way to show keyboard with english symbols and digits only?

I've tried to set UITextField keyboardType property to UIKeyboardTypeASCIICapable, but get only local (in my case russian) keyboard, not english

Thanks in advance!
__________________
be patient, my english is not ideal
vja is offline   Reply With Quote
Old 10-21-2009, 02:55 AM   #2 (permalink)
vja
Registered Member
 
Join Date: Jan 2009
Location: Izhevsk, Russia
Age: 27
Posts: 41
Send a message via Skype™ to vja
Default

up!
__________________
be patient, my english is not ideal
vja is offline   Reply With Quote
Old 01-20-2010, 06:17 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 35
Default

I need this same thing! Any solutions?
miniyou64 is offline   Reply With Quote
Old 01-20-2010, 06:19 PM   #4 (permalink)
vja
Registered Member
 
Join Date: Jan 2009
Location: Izhevsk, Russia
Age: 27
Posts: 41
Send a message via Skype™ to vja
Default

hi!

You may use fast'n'dirty solutin - accept only english symbols and digits, works fine =)
__________________
be patient, my english is not ideal
vja is offline   Reply With Quote
Old 01-20-2010, 06:20 PM   #5 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 35
Default

Yeah,
I was hoping to totally not allow non english keyboards.


Quote:
Originally Posted by vja View Post
hi!

You may use fast'n'dirty solutin - accept only english symbols and digits, works fine =)
miniyou64 is offline   Reply With Quote
Old 10-07-2011, 04:18 AM   #6 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 1
Default

Hi, I'm all new here.
Currently I'm having same problem as you guys, and the search turns me here.
I don't know if any of you have figured it out or not, but after some work around, I can make it work. It's not the idea solution, but it solved my needs. So I will put it here in case some one find it helpful.

The trick is to catch event KeyBoardWillShow, and use advantage of SecuredText property of UITextField.
The idea is simple: firstly you set textfield as securedText in viewDidLoad:
[yourTextField setSecureTextEntry:YES];
Then when keyboard shows up, you set it back to not secure, then keyboard will always be English (or at least, latin character keyboard).

Here are the steps:
- (void) keyboardWillShow;
{
[textField setSecureTextEntry:NO];
}

- (void)viewDidLoad
{
[textField setSecureTextEntry:YES];

//add observer
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(keyboardWillShow) name:UIKeyboardWillShowNotification object:nil];

[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}

Simple enough.!

If you guys have other ways around, then I'm happy to learn it.

Edit: don't forget to remove observer when you're done with it, Or just do the clean up in viewDidUnload method:

- (void)viewDidUnload
{
[super viewDidUnload];

[[NSNotificationCenter defaultCenter]removeObserver:self];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

Last edited by tiendat26; 10-07-2011 at 04:20 AM. Reason: Add remove observer part
tiendat26 is offline   Reply With Quote
Reply

Bookmarks

Tags
english keyboard, keyboard, uitextfield

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 252
24 members and 228 guests
ADY, AragornSG, bookesp, chillyh, dacapo, Dani77, Davey555, Dominus, dre, glenn_sayers, HemiMG, JasonR, karlam963, LEARN2MAKE, M.A.S., marshusensei, mer10, nobre84, Oral B, prchn4christ, Raggou, Rudy, spiderguy84, themathminister
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,765
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:28 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0