TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | BSD |
ReleasedLast Release | Mar 2015 |
Maintained by Bas van Kuijck.
Depends on: | |
Masonry | ~> 0.6 |
ReactiveCocoa | ~> 2.4 |
FXBlurView | ~> 1.6 |
iOS7 style passcode lock. Fully customizable.
pod 'ESPinEntryView', '~> 1.0'
These classes have the following dependecies:
QuartzCore
FrameworkAudioToolbox
Framework#import <ESPinEntryView.h>
ESPinEntryView *entryView = [[ESPinEntryView alloc] initWithFrame:self.view.bounds];
[entryView setBackgroundBlurRadius:15];
[entryView setDelegate:self];
[entryView setBackgroundView:[[UIView alloc] init]];
[entryView.backgroundView setBackgroundColor:[UIColor blueColor]];
[entryView setShowAlphabet:YES];
[entryView setShowCancelButton:YES];
[self.view addSubview:entryView];
#import <ESPinEntryViewController.h>
ESPinEntryViewController *viewController = [[ESPinEntryViewController alloc] init];
[viewController setDelegate:self];
[viewController.pinEntryView setBackgroundBlurRadius:15];
[viewController.pinEntryView setBackgroundView:[[UIView alloc] init]];
[viewController.pinEntryView setBackgroundColor:[UIColor blueColor]];
[viewController.pinEntryView setShowAlphabet:YES];
[viewController.pinEntryView setShowCancelButton:YES];
[self presentViewController:viewController animated:YES completion:nil];
- (BOOL)pinEntry:(ESPinEntryView *)pinEntryView isValidCode:(NSString *)code
{
NSLog(@"Attempt %zd", pinEntryView.attempts);
return [code isEqualToString:@"1234"];
}
deleteText
: The text in the delete button (default = "Delete")cancelText
: The text in the cancel button (default = "Cancel")headerText
: The top text that asks the user to enter a passcode (default = "Enter Passcode")showCancelButton
: Should the cancel button appear when no digits are entered (Default = NO)showAlphabet
: Should the entry buttons contain alphabet characters. (Default = NO)backgroundView
: Should the entry buttons contain alphabet characters. (Default = Blue/grayish background)backgroundBlurRadius
: The blur radius given to the background view (Default = 15)backgroundColor
: The background color that overlays the backgroundView (Default = 70% alpha black)numberOfDigits
: The total number of digits that should be entered. (Default = 4)attempts
: The total number of attempts (readonly)code
: The code that is entered. (readonly)vibrate
: Should the device vibrate when an incorrect entry is given (Default = YES)delegate