Commit 30feeb58 authored by guanghui.shi's avatar guanghui.shi

密码文案居中

parent 5c2e1fcd
......@@ -16,6 +16,9 @@
@interface QGDepositPwdView ()
///背景
@property (nonatomic, strong) QGDesignatedCornerView *backView ;
/// 密码框
@property (nonatomic, strong) QGPwdTextView *textView;
......@@ -75,6 +78,7 @@
QGDesignatedCornerView *backView = [[QGDesignatedCornerView alloc]initWithRadius:20 corner:UIRectCornerTopLeft | UIRectCornerTopRight];
backView.backgroundColor = UIColor.whiteColor;
[self.contentView addSubview:backView];
self.backView = backView;
[backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
......@@ -220,7 +224,7 @@
- (void)keyboardWillHideNotification:(NSNotification *)not
{
NSDictionary *userInfo = not.userInfo;
CGRect keyboardBounds = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
// CGRect keyboardBounds = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
//获取键盘动画的duration
CGFloat duration = [[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
......@@ -305,14 +309,23 @@
self.acountTitleLab.text = @"转出账户";
self.depositeTitleLab.text = @"转入金额";
self.depositeImageV.image = [UIImage imageNamed:@"deposit_in"];
[self.depositeTitleLab mas_updateConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.backView).offset(13);
}];
}else if (type == QGDepositTypeOut){
self.acountTitleLab.text = @"转出账户";
self.depositeTitleLab.text = @"转出金额";
self.depositeImageV.image = [UIImage imageNamed:@"deposit_out"];
[self.depositeTitleLab mas_updateConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.backView).offset(13);
}];
}else if (type == QGDepositTypeRepay){
self.acountTitleLab.text = @"付款方式";
self.depositeTitleLab.text = @"享花卡还款";
self.depositeImageV.image = nil;
[self.depositeTitleLab mas_updateConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.backView);
}];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment