|
|
@@ -33,7 +33,7 @@
|
|
|
#define UM_Alert_Horizontal_LoginBtn_Height 51.0
|
|
|
|
|
|
/**竖屏全屏*/
|
|
|
-#define UM_LogoImg_OffetY 32.0
|
|
|
+#define UM_LogoImg_OffetY 132.0
|
|
|
#define UM_SloganTxt_OffetY 150.0
|
|
|
#define UM_SloganTxt_Height 24.0
|
|
|
#define UM_NumberTxt_OffetY 220.0
|
|
|
@@ -68,11 +68,11 @@ static CGFloat ratio ;
|
|
|
}
|
|
|
|
|
|
/// 创建横屏全屏的model
|
|
|
-+ (UMCustomModel *)createFullScreenWithColor:(NSString*) colorHex {
|
|
|
- UIColor* color = [self colorFromHexString:colorHex];
|
|
|
++ (UMCustomModel *)create
|
|
|
+{
|
|
|
+ UIColor* color = [self colorFromHexString:@"#26f50d"];
|
|
|
UMCustomModel *model = [[UMCustomModel alloc] init];
|
|
|
-
|
|
|
-
|
|
|
+ model.supportedInterfaceOrientations = UIInterfaceOrientationMaskAllButUpsideDown;
|
|
|
model.navColor = [self colorFromHexString:@"#181818"];
|
|
|
model.navTitle = [[NSAttributedString alloc] initWithString:@"" attributes:@{NSForegroundColorAttributeName : UIColor.whiteColor,NSFontAttributeName : [UIFont systemFontOfSize:20.0]}];
|
|
|
model.navIsHidden = YES;
|
|
|
@@ -81,35 +81,40 @@ static CGFloat ratio ;
|
|
|
// [rightBtn setTitle:@"更多" forState:UIControlStateNormal];
|
|
|
// model.navMoreView = rightBtn;
|
|
|
|
|
|
- model.privacyNavColor = color;
|
|
|
- model.privacyNavBackImage = [UIImage imageNamed:@"icon_nav_back_light"];
|
|
|
- model.privacyNavTitleFont = [UIFont systemFontOfSize:20.0];
|
|
|
- model.privacyNavTitleColor = UIColor.whiteColor;
|
|
|
|
|
|
- model.logoImage = [UIImage imageNamed:@"lvzhopu-logo"];
|
|
|
+ model.logoImage = [UIImage imageNamed:@"logo"];
|
|
|
model.logoIsHidden = NO;
|
|
|
+ model.logoFrameBlock = ^CGRect(CGSize screenSize, CGSize superViewSize, CGRect frame) {
|
|
|
+ frame.origin.x = (screenSize.width - 120) / 2;
|
|
|
+ frame.size.width = 120;
|
|
|
+ return frame;
|
|
|
+ };
|
|
|
+
|
|
|
model.sloganIsHidden = YES;
|
|
|
|
|
|
-
|
|
|
model.numberColor = color;
|
|
|
model.numberFont = [UIFont systemFontOfSize:30.0];
|
|
|
- model.loginBtnText = [[NSAttributedString alloc] initWithString:@"" attributes:@{NSForegroundColorAttributeName : UIColor.whiteColor, NSFontAttributeName : [UIFont systemFontOfSize:16.0]}];
|
|
|
- model.loginBtnBgImgs = @[[UIImage imageNamed:@"btn_login"], [UIImage imageNamed:@"btn_login_dis"], [UIImage imageNamed:@"btn_login"]];
|
|
|
-
|
|
|
+ model.loginBtnText = [[NSAttributedString alloc] initWithString:@"一键登录" attributes:@{NSForegroundColorAttributeName : UIColor.blackColor, NSFontAttributeName : [UIFont systemFontOfSize:16.0]}];
|
|
|
+ UIImage* bgLogin = [[UIImage imageNamed:@"bg_login"] resizableImageWithCapInsets:UIEdgeInsetsMake(15, 15, 15, 15)];
|
|
|
+ model.loginBtnBgImgs = @[bgLogin, bgLogin, bgLogin];
|
|
|
+
|
|
|
+ model.changeBtnIsHidden = YES;
|
|
|
|
|
|
- //model.autoHideLoginLoading = NO;
|
|
|
+ model.autoHideLoginLoading = NO;
|
|
|
model.privacyOne = @[@"《用户服务协议》", @"https://www.raex.vip/service.html"];
|
|
|
model.privacyTwo = @[@"《平台隐私政策》", @"https://www.raex.vip/privacy.html"];
|
|
|
- model.privacyColors = @[UIColor.lightGrayColor, color];
|
|
|
+ model.privacyColors = @[UIColor.lightGrayColor, [self colorFromHexString:@"#3ab200"]];
|
|
|
model.privacyAlignment = NSTextAlignmentCenter;
|
|
|
model.privacyFont = [UIFont fontWithName:@"PingFangSC-Regular" size:13.0];
|
|
|
model.privacyOperatorPreText = @"《";
|
|
|
model.privacyOperatorSufText = @"》";
|
|
|
-
|
|
|
- //model.checkBoxIsHidden = NO;
|
|
|
- model.checkBoxWH = 17.0;
|
|
|
- model.changeBtnTitle = [[NSAttributedString alloc] initWithString:@"切换到其他方式" attributes:@{NSForegroundColorAttributeName:UIColor.whiteColor, NSFontAttributeName : [UIFont systemFontOfSize:16.0]}];
|
|
|
- model.changeBtnIsHidden = YES;
|
|
|
+ model.privacyNavColor = [self colorFromHexString:@"#181818"];
|
|
|
+ model.privacyNavBackImage = [UIImage imageNamed:@"icon_nav_back_light"];
|
|
|
+ model.privacyNavTitleFont = [UIFont systemFontOfSize:20.0];
|
|
|
+ model.privacyNavTitleColor = UIColor.whiteColor;
|
|
|
+
|
|
|
+ model.checkBoxIsHidden = YES;
|
|
|
+
|
|
|
//model.prefersStatusBarHidden = NO;
|
|
|
model.preferredStatusBarStyle = UIStatusBarStyleLightContent;
|
|
|
//model.presentDirection = PNSPresentationDirectionBottom;
|
|
|
@@ -135,25 +140,25 @@ static CGFloat ratio ;
|
|
|
};
|
|
|
model.loginBtnFrameBlock = ^CGRect(CGSize screenSize, CGSize superViewSize, CGRect frame) {
|
|
|
double scale = screenSize.width / 375;
|
|
|
- frame.origin.x = (screenSize.width - 290 * scale) / 2;
|
|
|
+ frame.origin.x = 50;
|
|
|
frame.origin.y = 228;
|
|
|
- frame.size.width = 290 * scale;
|
|
|
- frame.size.height = 40 * scale;
|
|
|
+ frame.size.width = screenSize.width - 100;
|
|
|
+ frame.size.height = 50;
|
|
|
return frame;
|
|
|
};
|
|
|
|
|
|
//model.privacyFrameBlock =
|
|
|
|
|
|
- model.backgroundImage = [UIImage imageNamed:@"login"];
|
|
|
+ model.backgroundImage = [UIImage imageNamed:@"bg"];
|
|
|
model.backgroundImageContentMode = UIViewContentModeScaleAspectFill;
|
|
|
|
|
|
//添加自定义控件并对自定义控件进行布局
|
|
|
__block UIButton *customBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
+ [customBtn setTitle:@"取消" forState:UIControlStateNormal];
|
|
|
+ [customBtn.titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:@"取消" attributes:@{NSForegroundColorAttributeName : [self colorFromHexString:@"#939599"], NSFontAttributeName : [UIFont systemFontOfSize:16.0]}]];
|
|
|
+ [customBtn setTitleColor:[self colorFromHexString:@"#939599"] forState:UIControlStateNormal];
|
|
|
[customBtn addTarget:self action:@selector(buttonClick) forControlEvents:UIControlEventTouchUpInside];
|
|
|
- [[customBtn imageView] setContentMode:UIViewContentModeScaleAspectFill];
|
|
|
- [customBtn setImage:[UIImage imageNamed:@"btn_change"] forState:UIControlStateNormal];
|
|
|
- [customBtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentFill];
|
|
|
- [customBtn setContentVerticalAlignment:UIControlContentVerticalAlignmentFill];
|
|
|
+ [customBtn setBackgroundImage:[[UIImage imageNamed:@"bg_change"] resizableImageWithCapInsets:UIEdgeInsetsMake(15, 15, 15, 15)] forState:UIControlStateNormal];
|
|
|
model.customViewBlock = ^(UIView * _Nonnull superCustomView) {
|
|
|
[superCustomView addSubview:customBtn];
|
|
|
//设置背景颜色
|
|
|
@@ -161,11 +166,10 @@ static CGFloat ratio ;
|
|
|
};
|
|
|
model.customViewLayoutBlock = ^(CGSize screenSize, CGRect contentViewFrame, CGRect navFrame, CGRect titleBarFrame, CGRect logoFrame, CGRect sloganFrame, CGRect numberFrame, CGRect loginFrame, CGRect changeBtnFrame, CGRect privacyFrame) {
|
|
|
CGRect frame = customBtn.frame;
|
|
|
- double scale = screenSize.width / 375;
|
|
|
- frame.origin.x = (screenSize.width - 290 * scale) / 2;
|
|
|
- frame.size.width = 290 * scale;
|
|
|
- frame.size.height = 40 * scale;
|
|
|
- frame.origin.y = 228 + frame.size.height + 20 * scale;
|
|
|
+ frame.origin.x = 50;
|
|
|
+ frame.size.width = screenSize.width - 100;
|
|
|
+ frame.size.height = 50;
|
|
|
+ frame.origin.y = 228 + frame.size.height + 30;
|
|
|
customBtn.frame = frame;
|
|
|
};
|
|
|
|
|
|
@@ -178,7 +182,8 @@ static CGFloat ratio ;
|
|
|
return size.width > size.height;
|
|
|
}
|
|
|
|
|
|
-+(void)buttonClick{
|
|
|
- NSLog(@"buttonClick");
|
|
|
++(void)buttonClick
|
|
|
+{
|
|
|
+ [UMCommonHandler cancelLoginVCAnimated:YES complete:nil];
|
|
|
}
|
|
|
@end
|