6、使用示例
在控制器中创建,并设置vertificationCodeInputView相关属性
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor lightGrayColor];
self.vertificationCodeInputView = [[IDVertificationCodeInputView alloc] initWithFrame:CGRectMake(50, 250, 200, 45)];
self.vertificationCodeInputView.backgroudImageName = @"1";
// 验证码(显示数字)
self.vertificationCodeInputView.secureTextEntry = NO;
//self.vertificationCodeInputView.secureTextEntry = YES;
[self.view addSubview:self.vertificationCodeInputView];
}
点击屏幕,打印验证码的内容
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
NSLog(@"%@", self.vertificationCodeInputView.vertificationCode);
}
以上就是本文的全部内容,希望对大家的学习有所帮助。
注:相关教程知识阅读请移步到IOS开发频道。










