CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Alterplay.
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.
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.
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];
}
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];
}
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];
}
- (void)pinCodeViewController:(APPinViewController *)controller didFailVerificationWithCount:(NSUInteger)failsCount;
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#>
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.