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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-07-2011, 03:18 AM   #6 (permalink)
tiendat26
Registered Member
 
Join Date: Jul 2011
Posts: 1
tiendat26 is on a distinguished road
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 03:20 AM. Reason: Add remove observer part
tiendat26 is offline   Reply With Quote
 

» Advertisements
» Online Users: 428
15 members and 413 guests
Alexanskoo, aziz, diane21, elhanche, freewind, guillermotricia, hrushikeshaddon, iram91418, nicsmotherman, pipposanta, PixelEnvision, poke, QuantumDoja, ryantcb, subhan1
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,609
Threads: 94,084
Posts: 402,784
Top Poster: BrianSlick (7,990)
Welcome to our newest member, diane21
Powered by vBadvanced CMPS v3.1.0

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