Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b79949f

Browse files
设置邮箱的页面,按钮移下来
1 parent 8d38b0c commit b79949f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎Coding_iOS/Controllers/MeSetting/SettingEmailViewController.m

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
@interface SettingEmailViewController ()<UITableViewDataSource, UITableViewDelegate>
1616
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
17+
@property (strong, nonatomic) UIButton *footerBtn;
18+
1719
@property (assign, nonatomic) BOOL is2FAOpen;
1820
@property (strong, nonatomic) NSString *email, *j_captcha, *two_factor_code;
1921
@end
@@ -39,7 +41,8 @@ - (void)viewDidLoad{
3941
}];
4042
tableView;
4143
});
42-
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(doneBtnClicked:)];
44+
_myTableView.tableFooterView = [self customFooterView];
45+
// self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(doneBtnClicked:)];
4346
}
4447

4548
- (void)viewWillAppear:(BOOL)animated{
@@ -59,6 +62,20 @@ - (void)refresh2FA{
5962

6063
#pragma mark TableM
6164

65+
- (UIView *)customFooterView{
66+
UIView *footerV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 150)];
67+
_footerBtn = [UIButton buttonWithStyle:StrapSuccessStyle andTitle:@"发送验证邮箱" andFrame:CGRectMake(kLoginPaddingLeftWidth, 20, kScreen_Width-kLoginPaddingLeftWidth*2, 45) target:self action:@selector(doneBtnClicked:)];
68+
RAC(self, footerBtn.enabled) = [RACSignal combineLatest:@[RACObserve(self, email),
69+
RACObserve(self, j_captcha),
70+
RACObserve(self, two_factor_code)]
71+
reduce:^id(NSString *email, NSString *j_captcha, NSString *two_factor_code){
72+
return @(email.length > 0 && j_captcha.length > 0 && two_factor_code.length > 0);
73+
}];
74+
75+
[footerV addSubview:_footerBtn];
76+
return footerV;
77+
}
78+
6279
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
6380
return 3;
6481
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /