Skip to content

briTurner/LockScreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LockScreen

Algorithm Based Lock Screen (http://www.youtube.com/watch?v=YWO2WssNRRo)

NOTE: This project was created in a matter of hours, and is in no way complete.

Before Using!!

To Install --

  1. Copy directory "Lock Screen Library" into your project.
  2. #import "LSLockScreen.h" anywhere you need access to the classes.
  3. continue with the rest of the instructions bellow

Using the lock screen is made to be as easy as possible.

  1. Create a master password either progromatically, or allow the user to select their own password.

Creating password Programatically

1) Create a master password.
 LSPassword *_masterPassword = [[LSPassword alloc] init];
  1. Create each required character, and then add it to the master password.

    LSPasswordCharacter *char = [LSPasswordCharacter characterWithCharacterColor:LSPasswordCharacterColorNone size:LSPasswordCharacterSizeSmall shape:LSPasswordCharacterShapeNone]; [_masterPassword addPasswordCharacter:char];

Allowing the user to create passowrd

1) Create a Password Picker
 LSPasswordPickerViewController *vc = [[LSPasswordPickerViewController alloc] initWithPassword:_masterPassword];
  1. Set yourself as the delegate

    [vc setDelegate:self];

  2. present the LSPasswordPicker [self presentViewController:vc animated:YES completion:nil];

  3. Conform to the delegate so you can be notified when the user has finished picking a password

    • (void)passwordPickerViewController:(LSPasswordPickerViewController *)passwordPicker returnedWithPassword:(LSPassword *)password { _masterPassword = password; if ([[_masterPassword passwordCharacters] count] > 0) { [lockScreenButton setEnabled:YES]; } [self dismissViewControllerAnimated:YES completion:nil]; }
  4. Create the LSLockScreenViewController passing in the master password, as well as a success block and a failure block.

    LSLockScreenViewController *vc = [[LSLockScreenViewController alloc] initWithMasterPassword:_masterPassword failureBlock:^{ NSLog(@"failed to login"); } successBlock:^{ NSLog(@"successfully logged in"); }];

The rest is handled for you behind the scenes.

About

Algorithm Based Lock Screen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published