|
|
@@ -6,6 +6,7 @@
|
|
|
//
|
|
|
|
|
|
#import "USBInsertPopView.h"
|
|
|
+#import <Lottie/Lottie.h>
|
|
|
|
|
|
@interface USBInsertPopView ()
|
|
|
@property (nonatomic,strong) UIView* whiteBgView;
|
|
|
@@ -30,7 +31,7 @@
|
|
|
[self addSubview:_whiteBgView];
|
|
|
|
|
|
[_whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(390 + safeArea + 20);
|
|
|
+ make.height.mas_equalTo(500 + safeArea + 20);
|
|
|
make.left.mas_equalTo(0.f);
|
|
|
make.right.mas_equalTo(0.f);
|
|
|
make.bottom.mas_equalTo(20.f);
|
|
|
@@ -73,45 +74,78 @@
|
|
|
make.top.mas_equalTo(titleLab.mas_bottom).offset(10.f);
|
|
|
}];
|
|
|
|
|
|
- CGFloat imageW = SCREEN_W - 15.0*2;
|
|
|
- CGFloat imageH = 184.0*imageW/343.0;
|
|
|
-
|
|
|
- UIImageView *topImage = [[UIImageView alloc] init];
|
|
|
- topImage.image = [UIImage imageNamed:@"usb_pop_image"];
|
|
|
- [_whiteBgView addSubview:topImage];
|
|
|
+ LOTAnimationView *animation = [LOTAnimationView animationNamed:@"usbInsertAnimation"];
|
|
|
+ animation.loopAnimation = YES;
|
|
|
+ //animation.contentMode = UIViewContentModeScaleAspectFill;
|
|
|
+ [_whiteBgView addSubview:animation];
|
|
|
+ [animation playWithCompletion:^(BOOL animationFinished) {
|
|
|
+ // Do Something
|
|
|
+ }];
|
|
|
|
|
|
- [topImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(imageH);
|
|
|
- make.width.mas_equalTo(imageW);
|
|
|
+ CGFloat animationImageW = SCREEN_W - 15.0*2;
|
|
|
+ CGFloat animationImageH = 232.0*animationImageW/343.0;
|
|
|
+ [animation mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.height.mas_equalTo(animationImageH);
|
|
|
+ make.width.mas_equalTo(animationImageW);
|
|
|
make.left.mas_equalTo(15.f);
|
|
|
- make.top.mas_equalTo(tip1Lab.mas_bottom).offset(20);
|
|
|
+ make.top.mas_equalTo(tip1Lab.mas_bottom).offset(0);
|
|
|
}];
|
|
|
|
|
|
- NSString *subTip1 = NSLocalizedString(@"disk_insertion_pop_tip_sub1",nil);
|
|
|
- NSString *subTip2 = NSLocalizedString(@"disk_insertion_pop_tip_sub2",nil);
|
|
|
- NSString *subTip3 = NSLocalizedString(@"disk_insertion_pop_tip_sub3",nil);
|
|
|
-
|
|
|
- NSArray *titleArr = @[subTip1,subTip2,subTip3];
|
|
|
- CGFloat labelSpace = 10.0;
|
|
|
- CGFloat labelWidth = (imageW -20)/3.0;
|
|
|
-
|
|
|
- for (int i=0; i<titleArr.count; i++) {
|
|
|
-
|
|
|
- UILabel *subTipLab = [[UILabel alloc] init];
|
|
|
- subTipLab.text = titleArr[i];
|
|
|
- subTipLab.numberOfLines = 0;
|
|
|
- subTipLab.textAlignment = NSTextAlignmentCenter;
|
|
|
- subTipLab.textColor = [UIColor hwColor:@"##0A132B" alpha:1.0];
|
|
|
- subTipLab.font = [UIFont systemFontOfSize:14.0];
|
|
|
- [topImage addSubview:subTipLab];
|
|
|
-
|
|
|
- [subTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.height.mas_equalTo(40);
|
|
|
- make.width.mas_equalTo(labelWidth);
|
|
|
- make.left.mas_equalTo(i*(labelSpace + labelWidth));
|
|
|
- make.bottom.mas_equalTo(0);
|
|
|
- }];
|
|
|
- }
|
|
|
+ CGFloat imageW = SCREEN_W - 15.0*2;
|
|
|
+// CGFloat imageH = 184.0*imageW/343.0;
|
|
|
+//
|
|
|
+// UIImageView *topImage = [[UIImageView alloc] init];
|
|
|
+// topImage.image = [UIImage imageNamed:@"usb_pop_image"];
|
|
|
+// [_whiteBgView addSubview:topImage];
|
|
|
+//
|
|
|
+// [topImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(imageH);
|
|
|
+// make.width.mas_equalTo(imageW);
|
|
|
+// make.left.mas_equalTo(15.f);
|
|
|
+// make.top.mas_equalTo(tip1Lab.mas_bottom).offset(20);
|
|
|
+// }];
|
|
|
+//
|
|
|
+// NSString *subTip1 = NSLocalizedString(@"disk_insertion_pop_tip_sub1",nil);
|
|
|
+// NSString *subTip2 = NSLocalizedString(@"disk_insertion_pop_tip_sub2",nil);
|
|
|
+// NSString *subTip3 = NSLocalizedString(@"disk_insertion_pop_tip_sub3",nil);
|
|
|
+//
|
|
|
+// NSArray *titleArr = @[subTip1,subTip2,subTip3];
|
|
|
+// CGFloat labelSpace = 10.0;
|
|
|
+// CGFloat labelWidth = (imageW -20)/3.0;
|
|
|
+//
|
|
|
+// for (int i=0; i<titleArr.count; i++) {
|
|
|
+//
|
|
|
+// UILabel *subTipLab = [[UILabel alloc] init];
|
|
|
+// subTipLab.text = titleArr[i];
|
|
|
+// subTipLab.numberOfLines = 0;
|
|
|
+// subTipLab.textAlignment = NSTextAlignmentCenter;
|
|
|
+// subTipLab.textColor = [UIColor hwColor:@"##0A132B" alpha:1.0];
|
|
|
+// subTipLab.font = [UIFont systemFontOfSize:14.0];
|
|
|
+// [topImage addSubview:subTipLab];
|
|
|
+//
|
|
|
+// [subTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(40);
|
|
|
+// make.width.mas_equalTo(labelWidth);
|
|
|
+// make.left.mas_equalTo(i*(labelSpace + labelWidth));
|
|
|
+// make.bottom.mas_equalTo(0);
|
|
|
+// }];
|
|
|
+// }
|
|
|
+
|
|
|
+ NSString *bottomTipStr = NSLocalizedString(@"disk_insertion_pop_tip2",nil);
|
|
|
+ UILabel *bottomTipLab = [[UILabel alloc] init];
|
|
|
+ bottomTipLab.text = bottomTipStr;
|
|
|
+ //bottomTipLab.textAlignment = NSTextAlignmentCenter;
|
|
|
+ bottomTipLab.numberOfLines = 0;
|
|
|
+ bottomTipLab.textColor = [UIColor hwColor:@"#DD4E4E" alpha:1.0];
|
|
|
+ bottomTipLab.font = [UIFont boldSystemFontOfSize:12.0];
|
|
|
+ [_whiteBgView addSubview:bottomTipLab];
|
|
|
+
|
|
|
+ [bottomTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.height.mas_equalTo(50);
|
|
|
+ make.right.mas_equalTo(-15.f);
|
|
|
+ make.left.mas_equalTo(15.f);
|
|
|
+ make.top.mas_equalTo(animation.mas_bottom).offset(20.0);
|
|
|
+ }];
|
|
|
|
|
|
UIButton *konwBut = [[UIButton alloc] init];
|
|
|
[konwBut setTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil) forState:UIControlStateNormal];
|