Commit 5a92caa7 by ludi

完成对登录页第一页的修改

parent 96e710f7
Showing with 84 additions and 166 deletions
......@@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
/// APP状态改变的通知
@property (nonatomic, copy, readonly) NSString *appStatusUpdateNotificationKey;
/// APP状态
/// APP状态 sh:(0:关、1:开)
@property (nonatomic, assign, readonly) BOOL appStatus;
/// APP 第三方 z(i) f(u)开关
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "start_page_phone_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_phone_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "start_page_phone_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_phone_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phone-阿语-normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phone-阿语-normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phone-preesed@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phone-preesed@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phone-preesed阿语@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phone-preesed阿语@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "start_page_facebook_normal@2x.png",
"filename" : "fus_login_loginBtn_apple_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_facebook_normal@3x.png",
"filename" : "fus_login_loginBtn_apple_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "start_page_facebook_normal_rtl@2x.png",
"filename" : "fus_login_loginBtn_faceBook_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_facebook_normal_rtl@3x.png",
"filename" : "fus_login_loginBtn_faceBook_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "start_page_facebook_pressed@2x.png",
"filename" : "fus_login_loginBtn_google_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_facebook_pressed@3x.png",
"filename" : "fus_login_loginBtn_google_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "start_page_facebook_pressed_rtl@2x.png",
"filename" : "fus_login_loginBtn_line_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_page_facebook_pressed_rtl@3x.png",
"filename" : "fus_login_loginBtn_line_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "phone-normal@2x.png",
"filename" : "fus_login_loginBtn_phone_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phone-normal@3x.png",
"filename" : "fus_login_loginBtn_phone_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -58,7 +58,7 @@ typedef enum : NSUInteger {
/**
* 检测是否在AppStore审核状态
* 检测是否在AppStore sh 状态
*
* @param success 成功回调
* @param failure 失败回调
......
......@@ -76,7 +76,7 @@
}
/**
* 检测是否在AppStore审核状态
* 检测是否在AppStore sh状态
*
* @param success 成功回调
* @param failure 失败回调
......
......@@ -79,8 +79,10 @@
*/
@property (strong, nonatomic) IBOutlet UIButton *agreementBtn;
@property (weak, nonatomic) IBOutlet UIButton *phoneBtn;
@property (weak, nonatomic) IBOutlet UIButton *facebookBtn;
@property (weak, nonatomic) IBOutlet UIButton *facebookLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *googleLoginBtn;
@property (weak, nonatomic) IBOutlet UIButton *appleLoginBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *protocalBottomMarginConstrant;
// 绑定类型
......@@ -93,7 +95,7 @@
@property (nonatomic, strong) FUSUpdateModel *model;
@property (weak, nonatomic) IBOutlet UIView *appleLoginBgView;
//@property (weak, nonatomic) IBOutlet UIView *appleLoginBgView;
@property (nonatomic, strong) UIButton *skipBtn;
@property (nonatomic, strong) NSTimer *skipTimer;
......@@ -103,7 +105,7 @@
@property (nonatomic, assign) NSInteger waitTime;
@property (nonatomic, strong) ASAuthorizationAppleIDButton *appleIDBtn;
//@property (nonatomic, strong) ASAuthorizationAppleIDButton *appleIDBtn;
@property (strong, nonatomic) IBOutlet UIView *loginFaildReportView;
@property (strong, nonatomic) IBOutlet UILabel *loginFailReportTitleLabel;
......@@ -170,23 +172,27 @@
[self.navigationController setNavigationBarHidden:YES animated:YES];
[self fus_checkStateDidUpdate];
if (@available(iOS 13.0, *)) {
_appleLoginBgView.layer.cornerRadius = _appleLoginBgView.height/2.0;
_appleLoginBgView.clipsToBounds = YES;
_appleLoginBgView.hidden = NO;
// Sign In With Apple Button
_appleIDBtn = [ASAuthorizationAppleIDButton buttonWithType:ASAuthorizationAppleIDButtonTypeDefault style:ASAuthorizationAppleIDButtonStyleWhite];
_appleIDBtn.frame = _appleLoginBgView.bounds;
[_appleIDBtn addTarget:self action:@selector(handleAuthorizationAppleIDButtonPress) forControlEvents:UIControlEventTouchUpInside];
[self.appleLoginBgView addSubview:_appleIDBtn];
}else{
_appleLoginBgView.hidden = YES;
}
// if (@available(iOS 13.0, *)) {
// _appleLoginBgView.layer.cornerRadius = _appleLoginBgView.height/2.0;
// _appleLoginBgView.clipsToBounds = YES;
//
// _appleLoginBgView.hidden = NO;
// // Sign In With Apple Button
// _appleIDBtn = [ASAuthorizationAppleIDButton buttonWithType:ASAuthorizationAppleIDButtonTypeDefault style:ASAuthorizationAppleIDButtonStyleWhite];
// _appleIDBtn.frame = _appleLoginBgView.bounds;
// [_appleIDBtn addTarget:self action:@selector(handleAuthorizationAppleIDButtonPress) forControlEvents:UIControlEventTouchUpInside];
// [self.appleLoginBgView addSubview:_appleIDBtn];
// }else{
//
// _appleLoginBgView.hidden = YES;
// }
//
// if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
// _appleLoginBgView.hidden = YES;
// }
if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
_appleLoginBgView.hidden = YES;
if (!@available(iOS 13.0, *)) {
self.appleLoginBtn.hidden = YES;
}
[self.videoPlayer fus_resumePlayer];
......@@ -331,12 +337,12 @@
// 初始化View
- (void)initView {
[self.phoneBtn setTitle:FUSLocalizationHelper.localString(@"手机号登陆/注册") forState:UIControlStateNormal];
[self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_normal"]] forState:UIControlStateNormal];
[self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_pressed"]] forState:UIControlStateHighlighted];
[self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_normal"]] forState:UIControlStateNormal];
[self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_pressed"]] forState:UIControlStateHighlighted];
self.facebookLoginBtn.layer.cornerRadius = 25;
self.facebookLoginBtn.layer.masksToBounds = YES;
self.googleLoginBtn.layer.cornerRadius = 25;
self.googleLoginBtn.layer.masksToBounds = YES;
self.appleLoginBtn.layer.cornerRadius = 25;
self.appleLoginBtn.layer.masksToBounds = YES;
if (_waitTime > 0) {
[FUSCacheDataShare shareStore].isLoadedLaunch = YES;
......@@ -401,18 +407,18 @@
- (void)fus_checkStateDidUpdate {
[self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_normal"]] forState:UIControlStateNormal];
[self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_pressed"]] forState:UIControlStateHighlighted];
[self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_normal"]] forState:UIControlStateNormal];
[self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_pressed"]] forState:UIControlStateHighlighted];
[self.phoneBtn setTitle:FUSLocalizationHelper.localString(@"手机号登陆/注册") forState:UIControlStateNormal];
// [self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_normal"]] forState:UIControlStateNormal];
// [self.phoneBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_phone_pressed"]] forState:UIControlStateHighlighted];
//
// [self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_normal"]] forState:UIControlStateNormal];
// [self.facebookBtn setBackgroundImage:[UIImage imageNamed:[FUSRTL RTLImageName:@"start_page_facebook_pressed"]] forState:UIControlStateHighlighted];
// [self.phoneBtn setTitle:FUSLocalizationHelper.localString(@"手机号登陆/注册") forState:UIControlStateNormal];
[super fus_checkStateDidUpdate];
[self fus_setupProtocolLabel];
if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
_appleLoginBgView.hidden = YES;
}
// if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
// _appleLoginBgView.hidden = YES;
// }
}
- (void)fus_setupProtocolLabel {
......@@ -473,6 +479,7 @@
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"startPageVideo" ofType:@"mp4"]];
self.videoPlayer = [[FUSVideoPlayer alloc] initWithPlayView:self.bgImageView];
[self.videoPlayer fus_setPlayerViewFrame:self.view.bounds];
self.videoPlayer.isReplayWhenfinish = YES;
self.videoPlayer.cancelBecomeActiveNotification = YES;
self.videoPlayer.cancelResignActiveNotification = YES;
......@@ -577,6 +584,11 @@
[self fus_hideLoginFailView];
}
/// 点击苹果登录
- (IBAction)onClickAppleLogin:(UIButton *)sender {
[self handleAuthorizationAppleIDButtonPress];
}
/**
点击协议按钮
*/
......@@ -660,10 +672,10 @@
__weak typeof(self) weakSelf = self;
[self showLoginViewFinished:^{
[UIView animateWithDuration:1 animations:^{
weakSelf.startSplashView.alpha = 0;
// weakSelf.startSplashView.alpha = 0;
weakSelf.skipBtn.hidden = YES;
} completion:^(BOOL finished) {
[weakSelf.startSplashView removeFromSuperview];
// [weakSelf.startSplashView removeFromSuperview];
if (weakSelf.model) {
[weakSelf fus_showUpdateViewWith:weakSelf.model];
......@@ -697,16 +709,27 @@
[weakSelf setupVideoView];
}
[UIView animateWithDuration:1 animations:^{
[UIView animateWithDuration:0.5 delay:1 options:UIViewAnimationOptionCurveEaseInOut animations:^{
weakSelf.startSplashView.alpha = 0;
} completion:^(BOOL finished) {
[weakSelf.startSplashView removeFromSuperview];
if (weakSelf.model) {
[weakSelf fus_showUpdateViewWith:_model];
[weakSelf fus_showUpdateViewWith:weakSelf.model];
weakSelf.model = nil;
}
}];
// [UIView animateWithDuration:1 animations:^{
// weakSelf.startSplashView.alpha = 0;
// } completion:^(BOOL finished) {
// [weakSelf.startSplashView removeFromSuperview];
//
// if (weakSelf.model) {
// [weakSelf fus_showUpdateViewWith:_model];
// weakSelf.model = nil;
// }
// }];
});
}
......
......@@ -43,7 +43,7 @@
[self addSubview:self.logoImgView];
[self.logoImgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.left.inset(10);
make.centerY.offset(-80);
make.centerY.offset(-68);
make.width.equalTo(self.logoImgView.mas_height).multipliedBy(393/293.f);
}];
......
......@@ -23,7 +23,7 @@
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="fus_startSplash_logo_image_v1.png" translatesAutoresizingMaskIntoConstraints="NO" id="gnB-ZF-qMi">
<rect key="frame" x="10" y="219.33333333333334" width="373" height="278.33333333333326"/>
<rect key="frame" x="10" y="219" width="373" height="278"/>
<constraints>
<constraint firstAttribute="width" secondItem="gnB-ZF-qMi" secondAttribute="height" multiplier="393:293" id="lQc-ZD-oa2"/>
</constraints>
......@@ -37,7 +37,7 @@
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="24" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="gnB-ZF-qMi" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="10" id="tiE-pg-OM4"/>
<constraint firstItem="gnB-ZF-qMi" firstAttribute="centerY" secondItem="Bcu-3y-fUS" secondAttribute="centerY" constant="-80" id="tr3-E6-XYB"/>
<constraint firstItem="gnB-ZF-qMi" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" constant="-68" id="tr3-E6-XYB"/>
</constraints>
</view>
</viewController>
......
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 sign in to comment