sudo rm -rf
sudo rm -rf

Reputation: 29524

Making a password lock for an app?

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!

Upvotes: 4

Views: 5233

Answers (4)

Mazen K
Mazen K

Reputation: 3662

iOS 7 style Passcode. Complete functional demo with great documentation showing the different states (i.e Enable, Test, Change & Turn Off)

https://github.com/rolandleth/LTHPasscodeViewController

Upvotes: 1

Tudor
Tudor

Reputation: 4164

Here is another library, just in case someone is looking for something like this: http://cocoacontrols.com/platforms/ios/controls/abpadlockscreen

Upvotes: 1

sudo rm -rf
sudo rm -rf

Reputation: 29524

Just found a project that replicates this perfectly. I'm going to post this here for future reference in case anyone needs it. https://github.com/guicocoa/pinview

https://github.com/guicocoa/pinview

Upvotes: 2

John Boker
John Boker

Reputation: 83699

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.

Upvotes: 1

Related Questions