Commit e909c7aa authored by Steven杜宇's avatar Steven杜宇

一键登录二次弹窗

parent 0b6bb7a8
...@@ -11,6 +11,8 @@ import AuthenticationServices ...@@ -11,6 +11,8 @@ import AuthenticationServices
class YHAppleLoginManager: NSObject { class YHAppleLoginManager: NSObject {
static let shared = YHAppleLoginManager()
func appleLogin() { func appleLogin() {
let appleIDProvider = ASAuthorizationAppleIDProvider() let appleIDProvider = ASAuthorizationAppleIDProvider()
......
...@@ -143,6 +143,8 @@ extension YHLoginMethodManager { ...@@ -143,6 +143,8 @@ extension YHLoginMethodManager {
model.sloganIsHidden = true model.sloganIsHidden = true
model.logoIsHidden = true model.logoIsHidden = true
model.changeBtnIsHidden = true model.changeBtnIsHidden = true
// 配置二次弹窗
model.privacyAlertIsNeedShow = true
// 协议勾选框UI自定义 // 协议勾选框UI自定义
let uncheckedImg = UIImage(named: "login_privacy_disagree")! let uncheckedImg = UIImage(named: "login_privacy_disagree")!
...@@ -206,6 +208,52 @@ extension YHLoginMethodManager { ...@@ -206,6 +208,52 @@ extension YHLoginMethodManager {
videoBgView.frame = UIScreen.main.bounds videoBgView.frame = UIScreen.main.bounds
} }
if model.privacyAlertIsNeedShow == false {
return model
}
// 配置二次弹窗
model.privacyAlertIsNeedShow = true
model.privacyAlertMaskAlpha = 0.5;
model.privacyAlertMaskColor = UIColor.black
model.privacyAlertCornerRadiusArray = [3, 3, 3, 3]
model.privacyAlertBackgroundColor = UIColor.white
model.privacyAlertAlpha = 1.0
model.privacyAlertTitleBackgroundColor = UIColor.white
model.privacyAlertContentBackgroundColor = UIColor.white
model.privacyAlertTitleFont = .PFSC_R(ofSize: 16)
model.privacyAlertTitleColor = UIColor.black
model.privacyAlertContentColors = [UIColor.gray, UIColor.orange]
model.privacyAlertContentAlignment = .center
let activeImage = TXCommonUtils.image(with: UIColor.orange, size: CGSizeMake(UIScreen.main.bounds.size.width - 2 * 18, 50), isRoundedCorner: true, radius: 10)!
let hightLightImage = TXCommonUtils.image(with: UIColor.gray, size: CGSizeMake(UIScreen.main.bounds.size.width - 2 * 18, 50), isRoundedCorner: true, radius: 10)!
model.privacyAlertBtnBackgroundImages = [activeImage, hightLightImage]
model.privacyAlertButtonTextColors = [UIColor.white, UIColor.blue]
model.privacyAlertButtonFont = .PFSC_R(ofSize: 18)
model.privacyAlertCloseButtonIsNeedShow = true
model.privacyAlertMaskIsNeedShow = true
model.privacyAlertIsNeedAutoLogin = false
model.tapPrivacyAlertMaskCloseAlert = false
model.expandAuthPageCheckedScope = true
model.privacyAlertCloseButtonIsNeedShow = true
model.privacyAlertTitleFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(0, 20, frame.size.width, frame.size.height)
}
model.privacyAlertPrivacyContentFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(0, frame.origin.y+10, frame.size.width, frame.size.height);
}
model.privacyAlertButtonFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(frame.origin.x,superViewSize.height - 50 - 20, frame.size.width, 50)
}
model.privacyAlertFrameBlock = {
screenSize, superViewSize, frame in
return CGRectMake(40, (superViewSize.height - 150)*0.5, screenSize.width-80, 150)
}
return model return model
} }
} }
......
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