Skip to content

Commit ef74332

Browse files
committed
启动页
1 parent 1c6061f commit ef74332

5 files changed

Lines changed: 24 additions & 27 deletions

File tree

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@
375375
4EF91F641B00B62B0021C951 /* icon_not_locationed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EF91F621B00B62A0021C951 /* icon_not_locationed@2x.png */; };
376376
4EFE8DAC1B394A0D004B7559 /* file_changeType_COPY@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EFE8DAA1B394A0D004B7559 /* file_changeType_COPY@2x.png */; };
377377
4EFE8DAD1B394A0D004B7559 /* file_changeType_RENAME@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EFE8DAB1B394A0D004B7559 /* file_changeType_RENAME@2x.png */; };
378+
4EFE8DAF1B3960E6004B7559 /* logo_coding_top@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4EFE8DAE1B3960E6004B7559 /* logo_coding_top@2x.png */; };
379+
4EFE8DB91B3A5727004B7559 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4EFE8DB81B3A5727004B7559 /* Launch Screen.xib */; };
378380
68D9A2AD062641F5BCA573C5 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B024F2227BD4152BC7C9A7A /* libPods.a */; };
379381
8E03D4A219F695FE0092F8C8 /* libMobClickLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E03D49F19F695FE0092F8C8 /* libMobClickLibrary.a */; };
380382
8E03D4A419F696970092F8C8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E03D4A319F696970092F8C8 /* libz.dylib */; };
@@ -1283,6 +1285,8 @@
12831285
4EF91F621B00B62A0021C951 /* icon_not_locationed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_not_locationed@2x.png"; sourceTree = "<group>"; };
12841286
4EFE8DAA1B394A0D004B7559 /* file_changeType_COPY@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "file_changeType_COPY@2x.png"; sourceTree = "<group>"; };
12851287
4EFE8DAB1B394A0D004B7559 /* file_changeType_RENAME@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "file_changeType_RENAME@2x.png"; sourceTree = "<group>"; };
1288+
4EFE8DAE1B3960E6004B7559 /* logo_coding_top@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "logo_coding_top@2x.png"; sourceTree = "<group>"; };
1289+
4EFE8DB81B3A5727004B7559 /* Launch Screen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "Launch Screen.xib"; sourceTree = "<group>"; };
12861290
8B18B0211092D3903D031B13 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
12871291
8E03D49F19F695FE0092F8C8 /* libMobClickLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libMobClickLibrary.a; sourceTree = "<group>"; };
12881292
8E03D4A019F695FE0092F8C8 /* MobClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobClick.h; sourceTree = "<group>"; };
@@ -2732,6 +2736,7 @@
27322736
8EA6CF1419E240C40076D59C /* APIUrl.h */,
27332737
8EA6CF1519E240C40076D59C /* AppDelegate.h */,
27342738
8EA6CF1619E240C40076D59C /* AppDelegate.m */,
2739+
4EFE8DB81B3A5727004B7559 /* Launch Screen.xib */,
27352740
8EA6CF1719E240C40076D59C /* Coding_iOS-Info.plist */,
27362741
8EA6CF1819E240C40076D59C /* Coding_iOS-Prefix.pch */,
27372742
4E8C51AE1AC0177600B4C51F /* Coding_iOS-Prefix.pch.example */,
@@ -2944,6 +2949,7 @@
29442949
4E6D718B1A762879005AD988 /* icon_user_monkey_i6@2x.png */,
29452950
4E6D718C1A762879005AD988 /* icon_user_monkey_i6p@3x.png */,
29462951
4E07D3131A4D3CA6009EDDF2 /* logo_coding@2x.png */,
2952+
4EFE8DAE1B3960E6004B7559 /* logo_coding_top@2x.png */,
29472953
4E76D4DB1A5A77DD0094A35E /* register_arrow@2x.png */,
29482954
4E76D4DD1A5A7B4A0094A35E /* text_clear_btn@2x.png */,
29492955
4E03AC991A5BDDF9002B000B /* STARTIMAGE.jpg */,
@@ -3784,6 +3790,7 @@
37843790
8EA6D16A19E240C40076D59C /* nav_project_topic@2x.png in Resources */,
37853791
4E96E7E51A1B537E0037C098 /* icon_file_zip@2x.png in Resources */,
37863792
4E90F89E1AF709C100B44F03 /* topic-ios.html in Resources */,
3793+
4EFE8DAF1B3960E6004B7559 /* logo_coding_top@2x.png in Resources */,
37873794
4E66EE261A28226000DA1B3E /* button_file_createFolder_enable@2x.png in Resources */,
37883795
8EA6D19C19E240C40076D59C /* tipIcon_QcTask@2x.png in Resources */,
37893796
4E72F82F1B159997001B6CE6 /* tipIcon_Other@2x.png in Resources */,
@@ -3931,6 +3938,7 @@
39313938
4E6383E11B32676600D98648 /* taskPriority@2x.png in Resources */,
39323939
8EA6D19D19E240C40076D59C /* tipIcon_Task@2x.png in Resources */,
39333940
4E6384001B33C18700D98648 /* task_activity_icon_update_description@2x.png in Resources */,
3941+
4EFE8DB91B3A5727004B7559 /* Launch Screen.xib in Resources */,
39343942
8E97CEAA1A0C7E26006F9AD7 /* coding_emoji_19@2x.png in Resources */,
39353943
4EB845331AB83C3B0030DC69 /* git_icon_fork@2x.png in Resources */,
39363944
4E90F89D1AF709C100B44F03 /* markdown.html in Resources */,

Coding_iOS/Images/STARTIMAGE.jpg

-49.7 KB
Loading
17.9 KB
Loading

Coding_iOS/Util/Manager/StartImagesManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ - (void)loadStartImages{
115115

116116
- (void)refreshImagesPlist{
117117
NSString *aPath = @"api/wallpaper/wallpapers";
118-
NSDictionary *params = @{@"type" : @"5"};
118+
NSDictionary *params = @{@"type" : @"3"};
119119
[[CodingNetAPIClient sharedJsonClient] GET:aPath parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
120120
DebugLog(@"\n===========response===========\n%@:\n%@", aPath, responseObject);
121121
id error = [self handleResponse:responseObject];

Coding_iOS/Views/EaseStartView.m

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)