FWPasscodeView


@interface FWPasscodeView : UIView

FWPasscodeView

  • 是否需要光标,默认: YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL showCursor;
  • 验证码长度,默认: 4

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger codeLength;
  • 是否开启密文模式,默认: NO,描述:你可以在任何时候修改该属性,并且已经存在的文字会自动刷新。

    Declaration

    Objective-C

    @property (nonatomic) BOOL needSecurity;
  • 显示密文的延时时间,默认0防止录屏时录下明文

    Declaration

    Objective-C

    @property (nonatomic) CGFloat securityDelay;
  • 键盘类型,默认: UIKeyboardTypeNumberPad

    Declaration

    Objective-C

    @property (nonatomic) UIKeyboardType keyboardType;
  • 输入样式,默认: FWPasscodeInputTypeNumber

    Declaration

    Objective-C

    @property (nonatomic) FWPasscodeInputType inputType;
  • 自定义正则匹配输入内容,默认: @“",当inputType == FWPasscodeInputTypeRegex时才会生效

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nullable customInputRegex;
  • textContentType,描述: 你可以设置为 ‘nil’ 或者 ‘UITextContentTypeOneTimeCode’ 来自动获取短信验证码,默认: nil

    Declaration

    Objective-C

    @property (nonatomic, copy, null_unspecified) UITextContentType textContentType;
  • 占位字符填充值,在对应的输入框没有内容时,会显示该值。默认:nil

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable placeholderText;
  • 弹出键盘时,是否清空所有输入,只有在输入的字数等于codeLength时,生效。默认: NO

    Declaration

    Objective-C

    @property (nonatomic) BOOL clearAllWhenEditingBegin;
  • 输入完成时,是否自动结束编辑模式,收起键盘。默认: YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL endEditWhenEditingFinished;
  • Undocumented

    Declaration

    Objective-C

    @property (copy, nonatomic, nullable) void(^textDidChangeBlock
  • Undocumented

    Declaration

    Objective-C

    @property (copy, nonatomic, nullable) void(^editStatusChangeBlock
  • Undocumented

    Declaration

    Objective-C

    @property (strong, nonatomic) FWPasscodeFlowLayout * _Nullable flowLayout
  • Undocumented

    Declaration

    Objective-C

    @property (strong, nonatomic) FWPasscodeCellProperty * _Nullable cellProperty
  • Undocumented

    Declaration

    Objective-C

    @property (strong, nonatomic, readonly) NSString * _Nullable textValue
  • Undocumented

    Declaration

    Objective-C

    @property (strong, nonatomic) UIView * _Nullable inputAccessoryView
  • 装载数据和准备界面,beginEdit: 自动开启编辑模式。默认: YES

    Declaration

    Objective-C

    - (void)prepareView;
  • Undocumented

    Declaration

    Objective-C

    - (void)prepareViewWithBeginEdit:(BOOL)beginEdit;
  • 重载输入的数据(用来设置预设数据)

    Declaration

    Objective-C

    - (void)reloadInputString:(NSString *_Nullable)value;
  • 开始或者结束编辑模式

    Declaration

    Objective-C

    - (void)beginEdit;
  • Undocumented

    Declaration

    Objective-C

    - (void)endEdit;
  • 清空输入,beginEdit: 自动开启编辑模式。默认: YES

    Declaration

    Objective-C

    - (void)clearAll;
  • Undocumented

    Declaration

    Objective-C

    - (void)clearAllWithBeginEdit:(BOOL)beginEdit;
  • Undocumented

    Declaration

    Objective-C

    - (UICollectionView *_Nullable)collectionView;
  • Undocumented

    Declaration

    Objective-C

    - (void)setSecuritySymbol:(NSString *_Nullable)securitySymbol;
  • Undocumented

    Declaration

    Objective-C

    - (void)initDefaultValue;
  • Undocumented

    Declaration

    Objective-C

    - (UICollectionViewCell *_Nullable)collectionView:(UICollectionView *_Nullable)collectionView customCellForItemAtIndexPath:(NSIndexPath *_Nullable)indexPath;
  • Undocumented

    Declaration

    Objective-C

    - (void)resetCodeLength:(NSInteger)codeLength beginEdit:(BOOL)beginEdit;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithCodeLength:(NSInteger)codeLength;