APPinViewController

Drop-in iOS component for PIN (4 digit passcode) logic by folks from

Showing:

Popularity

Downloads/wk

0

GitHub Stars

65

Maintenance

Last Commit

7yrs ago

Contributors

4

Package

Dependencies

0

License

MIT

Categories

Readme

Easy drop-in component for iOS developers to deal easy with PIN (4 digit passcode) logic. This is the first version but we truly tried to make it reusable and customizable enough to save development time.

###How to Use: 1) Subclass APPinViewController:

@interface SamplePinViewController : APPinViewController

2) Bind your APPinView with File Owner's 'pinCodeView' in Xib on StoryBoard. (How to do it?)

..and this is it.

####To Set PIN: SamplePinViewController *pinVC = [SamplePinViewController new]; [self.navigationController pushViewController:pinVC animated:YES];

Delegate:

- (void)pinCodeViewController:(APPinViewController *)controller didCreatePinCode:(NSString *)pinCode {
    //Handle your pin code here
    //
    [self.navigationController popViewControllerAnimated:YES];
}

####To Verify PIN:

SamplePinViewController *pinVC = [SamplePinViewController new];
pinVC.pinCodeToCheck = <#Your Pin To Verify#>;
[self.navigationController pushViewController:pinVC animated:YES];

Delegate:

- (void)pinCodeViewController:(APPinViewController *)controller didVerifiedPincodeSuccessfully:(NSString *)pinCode {
    //Pin code verified
    [self.navigationController popViewControllerAnimated:YES];
}

####To Change PIN:

SamplePinViewController *pinVC = [SamplePinViewController new];
pinVC.pinCodeToCheck = <#Your Pin To Change#>;
pinVC.shouldResetPinCode = YES;
[self.navigationController pushViewController:pinVC animated:YES];

Delegate:

- (void)pinCodeViewController:(APPinViewController *)controller didChangePinCode:(NSString *)pinCode {
    //Handle your new pin code here
    
    [self.navigationController popViewControllerAnimated:YES];
}

To Handle Unsuccessful Attempts:

- (void)pinCodeViewController:(APPinViewController *)controller didFailVerificationWithCount:(NSUInteger)failsCount;

####...and One More Thing: You can feel free to customize pin view by changing its frame and position and set image for pins:

self.pinCodeView.selectedPinImage = <#Your UIImage#>
self.pinCodeView.normalPinImage = <#Your UIImage#>

####Example screenshots:

githalytics.com alpha If you have improvements or concerns, feel free to post an issue and write details.

======================= Check out all Alterplay's GitHub projects. Email us with other ideas and projects.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100