views:

45

answers:

1

Hello there!

I'm wanting to make a password unlock screen for my app, and I'm not sure how I'd go about it.

I'm wanting it to look like the Apple-designed version of it, which is the passcode lock setting screen.

alt text

How might I go about doing something like this, where as soon as all four digits are entered the code is immediately checked against a pre-set password?

Thanks!

+1  A: 

most likely you create the view and when all the fields are set you check against the known password or you check the hash of the input passkey against the hash you have stored.

basically you have a stored password/hash and you check against that when you have all field filled in in your view.

when the password is correct (either by hash checking or password) you show your next view, otherwise you display an error saying the password is incorrect.

John Boker
Yes, that's what I was meaning, but I actually was wondering how I could get the boxes and make the text move between them seamlessly.
willingfamily
with the iphone sdk you have a callback whenever someone adds text, if you see that there is one character you set focus to the next textbox, it's as easy as that. look at http://www.iphonedevsdk.com/forum/iphone-sdk-development/10860-how-do-i-replicate-passcode-screen.html
John Boker
Thanks for that link, looks very helpful!
willingfamily