Skip to content

验证码输入框,验证码,code view,iOS验证码输入

License

Notifications You must be signed in to change notification settings

xjh093/JHVerificationCodeView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c80faa3 · May 11, 2024

History

93 Commits
Sep 8, 2020
May 11, 2024
Aug 25, 2017
Sep 8, 2020
Sep 9, 2020
Sep 9, 2020
Aug 25, 2017
May 11, 2024
Nov 2, 2018
Jul 19, 2019

Repository files navigation

JHVerificationCodeView

A single authentication code input box

  • 单个的验证码输入框

Version

Latest release version:

  • 1.3.7 ❌ out of date!

  • [1.3.8] download master version for use. (2024-05-11 15:06:24)

Swift version:


Cocoapods

pod "JHVerificationCodeView"


What

image

image


Usage

    JHVCConfig *config     = [[JHVCConfig alloc] init];
    config.inputBoxNumber  = 6; 
    config.inputBoxSpacing = 5;
    config.inputBoxWidth   = 33;
    config.inputBoxHeight  = 28;
    config.tintColor       = [UIColor blackColor];
    config.secureTextEntry = YES;
    config.inputBoxColor   = [UIColor brownColor];
    config.font            = [UIFont boldSystemFontOfSize:16];
    config.textColor       = [UIColor brownColor];
    config.inputType       = JHVCConfigInputType_Number_Alphabet; // Default
    
    [self.view addSubview:({
        JHVerificationCodeView *codeView =
        [[JHVerificationCodeView alloc] initWithFrame:CGRectMake(10, 100, kScreenWidth-20, 30)
                                               config:config];
        codeView.finishBlock = ^(NSString *code) {
            label.text = code;
        };
        codeView;
    })];

Logs


More detail in Demo :)