登录界面键盘的回收

This commit is contained in:
fengshuo
2021-09-10 17:34:55 +08:00
parent 64c43cb737
commit 8b127baa51
5 changed files with 33 additions and 13 deletions

View File

@@ -38,10 +38,6 @@
@implementation LoginPasswordViewController
- (void)dealloc {
NSLog(@"销毁了");
}
- (LoginPasswordPresent *)createPresenter {
return [[LoginPasswordPresent alloc] init];
}
@@ -53,6 +49,10 @@
[self initEvents];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.view endEditing:NO];
}
#pragma mark - Private Method
- (void)initSubViews {
[self.view addSubview:self.codeLoginButton];
@@ -110,6 +110,7 @@
}] takeUntil:self.rac_willDeallocSignal];
[[self.forgetPasswordButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
LoginForgetPasswordViewController * forgetPasswordVC = [[LoginForgetPasswordViewController alloc] init];
[self.navigationController pushViewController:forgetPasswordVC animated:YES];
}];
@@ -122,6 +123,7 @@
///
[[self.codeLoginButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
@strongify(self);
[self.navigationController popViewControllerAnimated:YES];
}];
}