DSPasscode Protection is a Apple Style passcode protection , which could easily be used in your app by calling few methods
DSPasscode Protection is a Apple Style passcode protection , which could easily be used in your app by calling few methods
Using DSPasscode Protection
-
Create a sharedManager in Appdelegate .
[DSPasscodeManager sharedManager]; -
When user want to set Passcode , call this method from DSPasscodeManager class [[DSPasscodeManager sharedManager]setPasscodeLock]; with passing the Delegate [DSPasscodeManager sharedManager].delegate=self;
-
When user want to lock app , call this method from DSPasscodeManager class [[DSPasscodeManager sharedManager]setDelegate:self]; [[DSPasscodeManager sharedManager]lockApp];
-
You can also set the background for lock screen by using this method [[DSPasscodeManager sharedManager]setBackgroundImage:(UIImage*)];
-
You can check whether app is passcode protected [DSPasscodeManager isPasscodeProtected]; It returns BOOL value.
-
You can remove Passcode by calling [DSPasscodeManager removePasscode];
-
Show appropriate alerts on these methods -(void)userCancelledPasscodeLock --When user cancels setting pass lock -(void)passcodeMatchSuccessful -- When user unlocks the app and passcode matches -(void)passcodeMatchUnsuccessful --When user unlocks the app and passcode does not match -(void)passcodeSaved --When user saves new passcode -(void)confirmPasscodeMismatch --When user saves new password and confirm password do not match with earlier given password