CNLIVEViewController.m
3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// CNLIVEViewController.m
// CNLiveBPersonalVerificationModule
//
// Created by dawanzi on 04/06/2020.
// Copyright (c) 2020 dawanzi. All rights reserved.
//
#import "CNLIVEViewController.h"
#import "CNBPersonalVerificationController.h"
#import "CNBPerAuthSuccessController.h"
#import "CNBPerCertificationController.h"
#import "CNLiveBPersonAuthentProtocol.h"
#import "ApplyForShootController.h"
#import "CNLiveIDCardAuthenProtocol.h"
@interface CNLIVEViewController ()
@end
@implementation CNLIVEViewController
- (void)viewDidLoad
{
[super viewDidLoad];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(100, 100, 100, 100);
button.backgroundColor = [UIColor cyanColor];
[button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
UIButton *successBtn = [UIButton buttonWithType:UIButtonTypeSystem];
successBtn.frame = CGRectMake(240, 100, 100, 100);
successBtn.backgroundColor = [UIColor purpleColor];
[successBtn addTarget:self action:@selector(successBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:successBtn];
for (int i = 0; i < 3; i ++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(20*(i +1) + 100*i, 240, 100, 100);
button.backgroundColor = [UIColor greenColor];
[button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
button.tag = 200 +i;
[self.view addSubview:button];
}
}
- (void)buttonAction {
// ApplyForShootController *vc = [[ApplyForShootController alloc] init];
id <CNLiveIDCardAuthenProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveIDCardAuthenProtocol)];
ApplyForShootController *vc = (ApplyForShootController *)[service pushToCNLiveIDCardAuthController];
// CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init];
[self.navigationController pushViewController:vc animated:NO];
}
- (void)successBtnAction {
id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)];
CNBPerAuthSuccessController *vc = (CNBPerAuthSuccessController *)[service pushToPersonalAuthenticationSuccessController:@{}];
// CNBPerAuthSuccessController *vc = [[CNBPerAuthSuccessController alloc]init];
[self.navigationController pushViewController:vc animated:NO];
}
- (void)buttonClick:(UIButton *)sender {
if (sender.tag == 200) {
CNBPerCertificationController *vc = [[CNBPerCertificationController alloc]initControllerWithCertificatType:@{@"checkStatus":@"3"}];
[self.navigationController pushViewController:vc animated:NO];
}else if (sender.tag == 201){
CNBPerCertificationController *vc = [[CNBPerCertificationController alloc]initControllerWithCertificatType:@{@"checkStatus":@"0"}];
[self.navigationController pushViewController:vc animated:NO];
}else {
CNBPerCertificationController *vc = [[CNBPerCertificationController alloc]initControllerWithCertificatType:@{@"checkStatus":@"2"}];
[self.navigationController pushViewController:vc animated:NO];
}
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end