@@ -18,7 +18,7 @@ @interface EaseStartView ()
1818@implementation EaseStartView
1919
2020+ (instancetype )startView {
21- UIImage *logoIcon = [UIImage imageNamed: @" logo_coding " ];
21+ UIImage *logoIcon = [UIImage imageNamed: @" logo_coding_top " ];
2222 StartImage *st = [[StartImagesManager shareManager ] randomImage ];
2323 return [[self alloc ] initWithBgImage: st.image logoIcon: logoIcon descriptionStr: st.descriptionStr];
2424}
@@ -27,15 +27,15 @@ - (instancetype)initWithBgImage:(UIImage *)bgImage logoIcon:(UIImage *)logoIcon
2727 self = [super initWithFrame: kScreen_Bounds ];
2828 if (self) {
2929 // add custom code
30- self.backgroundColor = [UIColor colorWithHexString: @" 0x131313" ];
3130 UIColor *blackColor = [UIColor blackColor ];
32-
31+ self.backgroundColor = blackColor;
32+
3333 _bgImageView = [[UIImageView alloc ] initWithFrame: kScreen_Bounds ];
34- _bgImageView.contentMode = UIViewContentModeScaleAspectFill ;
34+ _bgImageView.contentMode = UIViewContentModeScaleAspectFit ;
3535 _bgImageView.alpha = 0.0 ;
3636 [self addSubview: _bgImageView];
3737
38- [self addGradientLayerWithColors: @[(id )[blackColor colorWithAlphaComponent: 0.0 ].CGColor, (id )[blackColor colorWithAlphaComponent: 0.9 ].CGColor] locations: nil startPoint: CGPointMake (0.5 , 0.6 ) endPoint: CGPointMake (0.5 , 1.0 )];
38+ [self addGradientLayerWithColors: @[(id )[blackColor colorWithAlphaComponent: 0.4 ].CGColor, (id )[blackColor colorWithAlphaComponent: 0.0 ].CGColor] locations: nil startPoint: CGPointMake (0.5 , 0.0 ) endPoint: CGPointMake (0.5 , 0.4 )];
3939
4040 _logoIconView = [[UIImageView alloc ] init ];
4141 _logoIconView.contentMode = UIViewContentModeScaleAspectFit;
@@ -56,31 +56,20 @@ - (instancetype)initWithBgImage:(UIImage *)bgImage logoIcon:(UIImage *)logoIcon
5656 }];
5757
5858 [_logoIconView mas_makeConstraints: ^(MASConstraintMaker *make) {
59- if (kDevice_Is_iPhone6Plus ) {
60- CGFloat scalePhysical = 414.0 /1242 ;
61- make.bottom .equalTo (self.mas_bottom ).offset (-230 *scalePhysical);
62- make.left .equalTo (self.mas_left ).offset (235 *scalePhysical);
63- make.right .equalTo (self.mas_right ).offset (-235 *scalePhysical);
64- }else if (kDevice_Is_iPhone6 ){
65- make.bottom .equalTo (self.mas_bottom ).offset (-65 );
66- make.left .equalTo (self.mas_left ).offset (69 );
67- make.right .equalTo (self.mas_right ).offset (-69 );
68- }else {
69- make.bottom .equalTo (self.mas_bottom ).offset (-56 );
70- make.left .equalTo (self.mas_left ).offset (60 );
71- make.right .equalTo (self.mas_right ).offset (-60 );
72- }
73- make.size .mas_lessThanOrEqualTo (CGSizeMake (255 , 60 ));
74- make.height .equalTo (_logoIconView.mas_width ).multipliedBy (60.0 /255.0 );
59+ make.centerX .equalTo (self);
60+ make.top .mas_equalTo (kScreen_Height /5 );
61+ make.width .mas_equalTo (kScreen_Width *5 /8 );
62+ make.height .mas_equalTo (kScreen_Width *5 /8 /4 );
7563 }];
64+
7665 [self configWithBgImage: bgImage logoIcon: logoIcon descriptionStr: descriptionStr];
7766 }
7867 return self;
7968}
8069
8170- (void )configWithBgImage : (UIImage *)bgImage logoIcon : (UIImage *)logoIcon descriptionStr : (NSString *)descriptionStr {
82- UIImage *bgImage_resize = [bgImage scaleToSize: [_bgImageView doubleSizeOfFrame ] usingMode: NYXResizeModeAspectFill];
83- self.bgImageView .image = bgImage_resize? bgImage_resize: bgImage;
71+ bgImage = [bgImage scaleToSize: [_bgImageView doubleSizeOfFrame ] usingMode: NYXResizeModeAspectFill];
72+ self.bgImageView .image = bgImage;
8473 self.logoIconView .image = logoIcon;
8574 self.descriptionStrLabel .text = descriptionStr;
8675 [self updateConstraintsIfNeeded ];
@@ -89,11 +78,11 @@ - (void)configWithBgImage:(UIImage *)bgImage logoIcon:(UIImage *)logoIcon descri
8978- (void )startAnimationWithCompletionBlock : (void (^)(EaseStartView *easeStartView))completionHandler {
9079 [kKeyWindow addSubview: self ];
9180 [kKeyWindow bringSubviewToFront: self ];
92- _bgImageView.alpha = 0.2 ;
93- _descriptionStrLabel.alpha = 0.2 ;
81+ _bgImageView.alpha = 0.0 ;
82+ _descriptionStrLabel.alpha = 0.0 ;
9483
9584 @weakify (self);
96- [UIView animateWithDuration: 1 .0 animations: ^{
85+ [UIView animateWithDuration: 2 .0 animations: ^{
9786 @strongify (self);
9887 self.bgImageView .alpha = 1.0 ;
9988 self.descriptionStrLabel .alpha = 1.0 ;
0 commit comments