BKPasscodeInputView.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // BKPasscodeInputView.h
  3. // BKPasscodeViewDemo
  4. //
  5. // Created by Byungkook Jang on 2014. 4. 20..
  6. // Copyright (c) 2014년 Byungkook Jang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "BKPasscodeField.h"
  10. typedef enum : NSUInteger {
  11. BKPasscodeInputViewNumericPasscodeStyle,
  12. BKPasscodeInputViewNormalPasscodeStyle,
  13. } BKPasscodeInputViewPasscodeStyle;
  14. @protocol BKPasscodeInputViewDelegate;
  15. @interface BKPasscodeInputView : UIView <UITextFieldDelegate, BKPasscodeFieldDelegate, NSCopying>
  16. @property (nonatomic, weak) id<BKPasscodeInputViewDelegate> delegate;
  17. @property (nonatomic) BKPasscodeInputViewPasscodeStyle passcodeStyle;
  18. @property (nonatomic) UIKeyboardType keyboardType;
  19. @property (nonatomic) NSUInteger maximumLength;
  20. @property (nonatomic, strong) NSString *title;
  21. @property (nonatomic, strong) NSString *message;
  22. @property (nonatomic, strong) NSString *errorMessage;
  23. @property (nonatomic, getter = isEnabled) BOOL enabled;
  24. @property (nonatomic, strong) NSString *passcode;
  25. @property (nonatomic, strong, readonly) UIControl *passcodeField;
  26. // You can override these methods to customize message label appearance.
  27. + (void)configureTitleLabel:(UILabel *)aLabel;
  28. + (void)configureMessageLabel:(UILabel *)aLabel;
  29. + (void)configureErrorMessageLabel:(UILabel *)aLabel;
  30. @end
  31. @protocol BKPasscodeInputViewDelegate <NSObject>
  32. /**
  33. * Tells the delegate that maximum length of passcode is entered or user tapped Done button in the keyboard (in case of BKPasscodeInputViewNormalPasscodeStyle).
  34. */
  35. - (void)passcodeInputViewDidFinish:(BKPasscodeInputView *)aInputView;
  36. @end