Skip to content

Commit 3f1935c

Browse files
committed
页面加载 gif 重新设计
1 parent 2641f2a commit 3f1935c

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,7 @@
11951195
927AFF551BFF6DAD00AAE593 /* shop_unexchange_icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 927AFF4D1BFF6DAD00AAE593 /* shop_unexchange_icon@3x.png */; };
11961196
927AFF581BFF755200AAE593 /* ExchangeGoodsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 927AFF571BFF755200AAE593 /* ExchangeGoodsViewController.m */; };
11971197
927AFF5B1BFF772A00AAE593 /* ShopOrderTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 927AFF5A1BFF772A00AAE593 /* ShopOrderTextFieldCell.m */; };
1198+
B1C871131EADAEE1003DACF0 /* loading_monkey@2x.gif in Resources */ = {isa = PBXBuildFile; fileRef = B1C871121EADAEE1003DACF0 /* loading_monkey@2x.gif */; };
11981199
B93D904B1ACBA3110057A6EE /* ProjectDeleteAlertControllerVisualStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B93D904A1ACBA3110057A6EE /* ProjectDeleteAlertControllerVisualStyle.m */; };
11991200
B94C1B691AC945D30000C271 /* NewProjectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B94C1B681AC945D30000C271 /* NewProjectViewController.m */; };
12001201
B94C1B6B1AC945FB0000C271 /* NewProject.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B94C1B6A1AC945FB0000C271 /* NewProject.storyboard */; };
@@ -3060,6 +3061,7 @@
30603061
927AFF571BFF755200AAE593 /* ExchangeGoodsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExchangeGoodsViewController.m; sourceTree = "<group>"; };
30613062
927AFF591BFF772A00AAE593 /* ShopOrderTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopOrderTextFieldCell.h; sourceTree = "<group>"; };
30623063
927AFF5A1BFF772A00AAE593 /* ShopOrderTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopOrderTextFieldCell.m; sourceTree = "<group>"; };
3064+
B1C871121EADAEE1003DACF0 /* loading_monkey@2x.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "loading_monkey@2x.gif"; sourceTree = "<group>"; };
30633065
B93D90491ACBA3110057A6EE /* ProjectDeleteAlertControllerVisualStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectDeleteAlertControllerVisualStyle.h; sourceTree = "<group>"; };
30643066
B93D904A1ACBA3110057A6EE /* ProjectDeleteAlertControllerVisualStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectDeleteAlertControllerVisualStyle.m; sourceTree = "<group>"; };
30653067
B94C1B671AC945D30000C271 /* NewProjectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewProjectViewController.h; sourceTree = "<group>"; };
@@ -5304,6 +5306,7 @@
53045306
8EA6CFC419E240C40076D59C /* xtsegment_bordor_right@2x.png */,
53055307
8ED2AAF819F60D5200607A1D /* loading_loop@2x.png */,
53065308
8ED2AAF919F60D5200607A1D /* loading_monkey@2x.png */,
5309+
B1C871121EADAEE1003DACF0 /* loading_monkey@2x.gif */,
53075310
8EF6433B19FE696B00F7EEB0 /* cell_checkmark@2x.png */,
53085311
8EF6434F19FF4E1600F7EEB0 /* comment_count_top_line@2x.png */,
53095312
4EA679171A14BFA0001A0324 /* icon_file_folder_default@2x.png */,
@@ -6409,6 +6412,7 @@
64096412
4E5D130A1C0ECB3400985AEB /* tweet_btn_comment@3x.png in Resources */,
64106413
13FB5D391CA17A6400EE127C /* close@3x.png in Resources */,
64116414
8E97CEA51A0C7E26006F9AD7 /* coding_emoji_14@2x.png in Resources */,
6415+
B1C871131EADAEE1003DACF0 /* loading_monkey@2x.gif in Resources */,
64126416
4E80E9511E02911E00DE1BC6 /* search_icon_topic@3x.png in Resources */,
64136417
D0C447D11C02DB6700DC1C4B /* pop_User@3x.png in Resources */,
64146418
4EB52F621C7C5C4F00B5EBEA /* task_resource_reference_Task@2x.png in Resources */,
31.9 KB
Loading

Coding_iOS/Util/OC_Category/UIView+Common.m

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define kTagBadgePointView 1001
1212
#define kTagLineView 1007
1313
#import <objc/runtime.h>
14+
#import "YLImageView.h"
15+
#import "YLGIFImage.h"
1416

1517
#import "Login.h"
1618
#import "User.h"
@@ -423,23 +425,32 @@ - (instancetype)initWithFrame:(CGRect)frame{
423425
self = [super initWithFrame:frame];
424426
if (self) {
425427
self.backgroundColor = [UIColor clearColor];
426-
_loopView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"loading_loop"]];
427-
_monkeyView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"loading_monkey"]];
428-
[_loopView setCenter:self.center];
429-
[_monkeyView setCenter:self.center];
430-
[self addSubview:_loopView];
428+
_monkeyView = [YLImageView new];
429+
_monkeyView.image = [YLGIFImage imageNamed:@"loading_monkey@2x.gif"];
431430
[self addSubview:_monkeyView];
432-
[_loopView mas_makeConstraints:^(MASConstraintMaker *make) {
433-
make.center.equalTo(self);
434-
}];
435431
[_monkeyView mas_makeConstraints:^(MASConstraintMaker *make) {
436-
make.center.equalTo(self);
432+
make.centerX.equalTo(self);
433+
make.centerY.equalTo(self).offset(-30);
434+
make.size.mas_equalTo(CGSizeMake(100, 100));
437435
}];
438-
439-
_loopAngle = 0.0;
440-
_monkeyAlpha = 1.0;
441-
_angleStep = 360/3;
442-
_alphaStep = 1.0/3.0;
436+
437+
// _loopView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"loading_loop"]];
438+
// _monkeyView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"loading_monkey"]];
439+
// [_loopView setCenter:self.center];
440+
// [_monkeyView setCenter:self.center];
441+
// [self addSubview:_loopView];
442+
// [self addSubview:_monkeyView];
443+
// [_loopView mas_makeConstraints:^(MASConstraintMaker *make) {
444+
// make.center.equalTo(self);
445+
// }];
446+
// [_monkeyView mas_makeConstraints:^(MASConstraintMaker *make) {
447+
// make.center.equalTo(self);
448+
// }];
449+
//
450+
// _loopAngle = 0.0;
451+
// _monkeyAlpha = 1.0;
452+
// _angleStep = 360/3;
453+
// _alphaStep = 1.0/3.0;
443454
}
444455
return self;
445456
}
@@ -450,7 +461,7 @@ - (void)startAnimating{
450461
return;
451462
}
452463
_isLoading = YES;
453-
[self loadingAnimation];
464+
// [self loadingAnimation];
454465
}
455466

456467
- (void)stopAnimating{

0 commit comments

Comments
 (0)