|
@@ -13,6 +13,7 @@
|
|
|
|
|
|
@interface LoginType1ViewController ()<UITextViewDelegate,UITextFieldDelegate>
|
|
|
@property(nonatomic,strong) UITextField *accountTF;
|
|
|
+@property(nonatomic,strong) UIButton *scanBut;
|
|
|
@property(nonatomic,strong) UIButton *loginOkBut;
|
|
|
@property(nonatomic,strong) UIButton *protocolSelectBut;//协议按钮
|
|
|
@property(nonatomic,strong) CAGradientLayer *gradientLayer;
|
|
@@ -99,10 +100,10 @@
|
|
|
// make.centerY.mas_equalTo(0);
|
|
|
// }];
|
|
|
|
|
|
- UIButton *scanBut = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
|
|
|
- [scanBut setImage:[UIImage imageNamed:@"login_scan"] forState:UIControlStateNormal];
|
|
|
- [scanBut addTarget:self action:@selector(didClickScanButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [bgView addSubview:scanBut];
|
|
|
+ _scanBut = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
|
|
|
+ [_scanBut setImage:[UIImage imageNamed:@"login_scan"] forState:UIControlStateNormal];
|
|
|
+ [_scanBut addTarget:self action:@selector(didClickScanButtonFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
+ [bgView addSubview:_scanBut];
|
|
|
//scanBut.backgroundColor = [UIColor greenColor];
|
|
|
|
|
|
// [scanBut mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
@@ -118,7 +119,7 @@
|
|
|
_accountTF.font = [UIFont systemFontOfSize:14];
|
|
|
_accountTF.delegate = self;
|
|
|
_accountTF.keyboardType = UIKeyboardTypeASCIICapable;//UIKeyboardTypeNamePhonePad;
|
|
|
- _accountTF.rightView = scanBut;
|
|
|
+ _accountTF.rightView = _scanBut;
|
|
|
_accountTF.rightViewMode = UITextFieldViewModeAlways;
|
|
|
[bgView addSubview:_accountTF];
|
|
|
|
|
@@ -292,10 +293,15 @@
|
|
|
#pragma mark 点击登录
|
|
|
- (void)didClickScanButtonFun:(UIButton*)but
|
|
|
{
|
|
|
+ _scanBut.userInteractionEnabled = NO;
|
|
|
ScanToLoginViewController *vc =[ScanToLoginViewController new];
|
|
|
[self.navigationController pushViewController:vc animated:YES];
|
|
|
|
|
|
KWeakSelf
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ weakSelf.scanBut.userInteractionEnabled = YES;
|
|
|
+ });
|
|
|
+
|
|
|
vc.didScanSNFun = ^(NSString * _Nonnull curSnStr) {
|
|
|
weakSelf.accountTF.text = curSnStr;
|
|
|
[weakSelf checkLoginButCanClickFun];
|