QuickSecurityCode 1.0.3

QuickSecurityCode 1.0.3

Maintained by pcjbird.




logo Build Status Pod Version Pod Platform Pod License CocoaPods CocoaPods GitHub release GitHub release Website

QuickSecurityCode

A security or sms verify code input control. 一个安全码/短信验证码输入控件,支持4位或6位数字的安全码/短信验证码。

特性 / Features

  1. 支持4位或6位的安全码/验证码。
  2. 设置设置边框颜色,数字字体及颜色。
  3. 支持 xib, storyboard。
  4. 支持用下划线替代边框模式。

演示 / Demo

安装 / Installation

方法一:QuickSecurityCode is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'QuickSecurityCode'

使用 / Usage

#import <QuickSecurityCode/QuickSecurityCode.h>

@interface ViewController ()

@property (weak, nonatomic) IBOutlet QuickSecurityCode *securityCodeCtrl1;
@property (weak, nonatomic) IBOutlet QuickSecurityCode *securityCodeCtrl2;
@property (weak, nonatomic) IBOutlet QuickSecurityCode *securityCodeCtrl3;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.securityCodeCtrl1.digitFont = [UIFont boldSystemFontOfSize:18.0f];
    self.securityCodeCtrl1.complete = ^(NSString *code) {
    NSLog(@"SecurityCodeCtrl1: %@", code);
    };

    self.securityCodeCtrl2.complete = ^(NSString *code) {
    NSLog(@"SecurityCodeCtrl2: %@", code);
    };
    
    self.securityCodeCtrl3.digitFont = [UIFont boldSystemFontOfSize:18.0f];
    self.securityCodeCtrl3.complete = ^(NSString *code) {
    NSLog(@"SecurityCodeCtrl3: %@", code);
    };
}

@end

关注我们 / Follow us

     
     Twitter URL   Twitter Follow