fix
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
}
|
||||
|
||||
- (void)buildUI {
|
||||
// 半透明背景,点击可关闭
|
||||
self.backdrop = [[UIControl alloc] init];
|
||||
self.backdrop.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.15];
|
||||
[self.backdrop addTarget:self action:@selector(dismissSelf) forControlEvents:UIControlEventTouchUpInside];
|
||||
@@ -44,11 +43,9 @@
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
|
||||
// 底部白色卡片
|
||||
self.sheet = [[UIView alloc] init];
|
||||
self.sheet.backgroundColor = [UIColor whiteColor];
|
||||
self.sheet.layer.cornerRadius = 12.0;
|
||||
self.sheet.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // 顶部圆角
|
||||
self.sheet.layer.masksToBounds = YES;
|
||||
[self.view addSubview:self.sheet];
|
||||
[self.sheet mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -57,7 +54,6 @@
|
||||
make.height.mas_equalTo(160);
|
||||
}];
|
||||
|
||||
// 复选框 + 文案
|
||||
self.checkButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
self.checkButton.layer.cornerRadius = 16;
|
||||
self.checkButton.layer.borderWidth = 2;
|
||||
@@ -84,7 +80,6 @@
|
||||
make.right.lessThanOrEqualTo(self.sheet).offset(-20);
|
||||
}];
|
||||
|
||||
// Continue 按钮
|
||||
self.continueButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
self.continueButton.backgroundColor = [UIColor whiteColor];
|
||||
self.continueButton.layer.cornerRadius = 10;
|
||||
@@ -136,12 +131,10 @@
|
||||
}
|
||||
|
||||
- (void)onContinue {
|
||||
// 继续:展示内置的登录页(Apple 登录)
|
||||
LoginViewController *login = [LoginViewController new];
|
||||
__weak typeof(self) weakSelf = self;
|
||||
login.onLoginSuccess = ^(NSDictionary * _Nonnull userInfo) {
|
||||
__strong typeof(weakSelf) self = weakSelf; if (!self) return;
|
||||
// 先关闭登录页,再收起底部弹层
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
if (self.onLoginSuccess) self.onLoginSuccess();
|
||||
[self dismissSelf];
|
||||
|
||||
Reference in New Issue
Block a user