Skip to content

Commit 40730aa

Browse files
committed
1.0.4
1 parent 7da7123 commit 40730aa

11 files changed

+76
-816
lines changed

Demo/WSProgressHUD.xcodeproj/project.pbxproj

+58-50
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
FE1C9C371B645F0700BB2D67 /* FBShimmeringLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1C9C2D1B645F0700BB2D67 /* FBShimmeringLayer.m */; };
11-
FE1C9C381B645F0700BB2D67 /* FBShimmeringView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1C9C2F1B645F0700BB2D67 /* FBShimmeringView.m */; };
12-
FE1C9C391B645F0700BB2D67 /* MMMaterialDesignSpinner.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1C9C311B645F0700BB2D67 /* MMMaterialDesignSpinner.m */; };
13-
FE1C9C3A1B645F0700BB2D67 /* WSIndefiniteAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1C9C331B645F0700BB2D67 /* WSIndefiniteAnimationView.m */; };
14-
FE1C9C3B1B645F0700BB2D67 /* WSProgressBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = FE1C9C341B645F0700BB2D67 /* WSProgressBundle.bundle */; };
15-
FE1C9C3C1B645F0700BB2D67 /* WSProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1C9C361B645F0700BB2D67 /* WSProgressHUD.m */; };
10+
FE52FF251B648EDD00703FB5 /* FBShimmeringLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE52FF1B1B648EDD00703FB5 /* FBShimmeringLayer.m */; };
11+
FE52FF261B648EDD00703FB5 /* FBShimmeringView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE52FF1D1B648EDD00703FB5 /* FBShimmeringView.m */; };
12+
FE52FF271B648EDD00703FB5 /* MMMaterialDesignSpinner.m in Sources */ = {isa = PBXBuildFile; fileRef = FE52FF1F1B648EDD00703FB5 /* MMMaterialDesignSpinner.m */; };
13+
FE52FF281B648EDD00703FB5 /* WSIndefiniteAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE52FF211B648EDD00703FB5 /* WSIndefiniteAnimationView.m */; };
14+
FE52FF291B648EDD00703FB5 /* WSProgressBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = FE52FF221B648EDD00703FB5 /* WSProgressBundle.bundle */; };
15+
FE52FF2A1B648EDD00703FB5 /* WSProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = FE52FF241B648EDD00703FB5 /* WSProgressHUD.m */; };
1616
FED429031B63E262002A5294 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FED428F21B63E262002A5294 /* AppDelegate.m */; };
1717
FED429061B63E262002A5294 /* image1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FED428F71B63E262002A5294 /* image1.jpg */; };
1818
FED429071B63E262002A5294 /* image2.png in Resources */ = {isa = PBXBuildFile; fileRef = FED428F81B63E262002A5294 /* image2.png */; };
@@ -40,19 +40,19 @@
4040
/* End PBXContainerItemProxy section */
4141

4242
/* Begin PBXFileReference section */
43-
FE1C9C2A1B645F0700BB2D67 /* FBShimmering-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FBShimmering-Prefix.pch"; sourceTree = "<group>"; };
44-
FE1C9C2B1B645F0700BB2D67 /* FBShimmering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmering.h; sourceTree = "<group>"; };
45-
FE1C9C2C1B645F0700BB2D67 /* FBShimmeringLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmeringLayer.h; sourceTree = "<group>"; };
46-
FE1C9C2D1B645F0700BB2D67 /* FBShimmeringLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBShimmeringLayer.m; sourceTree = "<group>"; };
47-
FE1C9C2E1B645F0700BB2D67 /* FBShimmeringView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmeringView.h; sourceTree = "<group>"; };
48-
FE1C9C2F1B645F0700BB2D67 /* FBShimmeringView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBShimmeringView.m; sourceTree = "<group>"; };
49-
FE1C9C301B645F0700BB2D67 /* MMMaterialDesignSpinner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMMaterialDesignSpinner.h; sourceTree = "<group>"; };
50-
FE1C9C311B645F0700BB2D67 /* MMMaterialDesignSpinner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMMaterialDesignSpinner.m; sourceTree = "<group>"; };
51-
FE1C9C321B645F0700BB2D67 /* WSIndefiniteAnimationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WSIndefiniteAnimationView.h; sourceTree = "<group>"; };
52-
FE1C9C331B645F0700BB2D67 /* WSIndefiniteAnimationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WSIndefiniteAnimationView.m; sourceTree = "<group>"; };
53-
FE1C9C341B645F0700BB2D67 /* WSProgressBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = WSProgressBundle.bundle; sourceTree = "<group>"; };
54-
FE1C9C351B645F0700BB2D67 /* WSProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WSProgressHUD.h; sourceTree = "<group>"; };
55-
FE1C9C361B645F0700BB2D67 /* WSProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WSProgressHUD.m; sourceTree = "<group>"; };
43+
FE52FF181B648EDD00703FB5 /* FBShimmering-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FBShimmering-Prefix.pch"; sourceTree = "<group>"; };
44+
FE52FF191B648EDD00703FB5 /* FBShimmering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmering.h; sourceTree = "<group>"; };
45+
FE52FF1A1B648EDD00703FB5 /* FBShimmeringLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmeringLayer.h; sourceTree = "<group>"; };
46+
FE52FF1B1B648EDD00703FB5 /* FBShimmeringLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBShimmeringLayer.m; sourceTree = "<group>"; };
47+
FE52FF1C1B648EDD00703FB5 /* FBShimmeringView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBShimmeringView.h; sourceTree = "<group>"; };
48+
FE52FF1D1B648EDD00703FB5 /* FBShimmeringView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBShimmeringView.m; sourceTree = "<group>"; };
49+
FE52FF1E1B648EDD00703FB5 /* MMMaterialDesignSpinner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMMaterialDesignSpinner.h; sourceTree = "<group>"; };
50+
FE52FF1F1B648EDD00703FB5 /* MMMaterialDesignSpinner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMMaterialDesignSpinner.m; sourceTree = "<group>"; };
51+
FE52FF201B648EDD00703FB5 /* WSIndefiniteAnimationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WSIndefiniteAnimationView.h; sourceTree = "<group>"; };
52+
FE52FF211B648EDD00703FB5 /* WSIndefiniteAnimationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WSIndefiniteAnimationView.m; sourceTree = "<group>"; };
53+
FE52FF221B648EDD00703FB5 /* WSProgressBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = WSProgressBundle.bundle; sourceTree = "<group>"; };
54+
FE52FF231B648EDD00703FB5 /* WSProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WSProgressHUD.h; sourceTree = "<group>"; };
55+
FE52FF241B648EDD00703FB5 /* WSProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WSProgressHUD.m; sourceTree = "<group>"; };
5656
FED428F11B63E262002A5294 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5757
FED428F21B63E262002A5294 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
5858
FED428F41B63E262002A5294 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
@@ -93,22 +93,36 @@
9393
/* End PBXFrameworksBuildPhase section */
9494

9595
/* Begin PBXGroup section */
96-
FE1C9C291B645F0700BB2D67 /* WSProgressHUD */ = {
96+
FE0FED181B647DB800E502BA /* Support file */ = {
9797
isa = PBXGroup;
9898
children = (
99-
FE1C9C2A1B645F0700BB2D67 /* FBShimmering-Prefix.pch */,
100-
FE1C9C2B1B645F0700BB2D67 /* FBShimmering.h */,
101-
FE1C9C2C1B645F0700BB2D67 /* FBShimmeringLayer.h */,
102-
FE1C9C2D1B645F0700BB2D67 /* FBShimmeringLayer.m */,
103-
FE1C9C2E1B645F0700BB2D67 /* FBShimmeringView.h */,
104-
FE1C9C2F1B645F0700BB2D67 /* FBShimmeringView.m */,
105-
FE1C9C301B645F0700BB2D67 /* MMMaterialDesignSpinner.h */,
106-
FE1C9C311B645F0700BB2D67 /* MMMaterialDesignSpinner.m */,
107-
FE1C9C321B645F0700BB2D67 /* WSIndefiniteAnimationView.h */,
108-
FE1C9C331B645F0700BB2D67 /* WSIndefiniteAnimationView.m */,
109-
FE1C9C341B645F0700BB2D67 /* WSProgressBundle.bundle */,
110-
FE1C9C351B645F0700BB2D67 /* WSProgressHUD.h */,
111-
FE1C9C361B645F0700BB2D67 /* WSProgressHUD.m */,
99+
FED428F31B63E262002A5294 /* LaunchScreen.xib */,
100+
FED428F71B63E262002A5294 /* image1.jpg */,
101+
FED428F81B63E262002A5294 /* image2.png */,
102+
FED428F91B63E262002A5294 /* Images.xcassets */,
103+
FED428FA1B63E262002A5294 /* IMG_6584.png */,
104+
FED428FB1B63E262002A5294 /* Info.plist */,
105+
FED428FC1B63E262002A5294 /* main.m */,
106+
);
107+
name = "Support file";
108+
sourceTree = "<group>";
109+
};
110+
FE52FF171B648EDD00703FB5 /* WSProgressHUD */ = {
111+
isa = PBXGroup;
112+
children = (
113+
FE52FF181B648EDD00703FB5 /* FBShimmering-Prefix.pch */,
114+
FE52FF191B648EDD00703FB5 /* FBShimmering.h */,
115+
FE52FF1A1B648EDD00703FB5 /* FBShimmeringLayer.h */,
116+
FE52FF1B1B648EDD00703FB5 /* FBShimmeringLayer.m */,
117+
FE52FF1C1B648EDD00703FB5 /* FBShimmeringView.h */,
118+
FE52FF1D1B648EDD00703FB5 /* FBShimmeringView.m */,
119+
FE52FF1E1B648EDD00703FB5 /* MMMaterialDesignSpinner.h */,
120+
FE52FF1F1B648EDD00703FB5 /* MMMaterialDesignSpinner.m */,
121+
FE52FF201B648EDD00703FB5 /* WSIndefiniteAnimationView.h */,
122+
FE52FF211B648EDD00703FB5 /* WSIndefiniteAnimationView.m */,
123+
FE52FF221B648EDD00703FB5 /* WSProgressBundle.bundle */,
124+
FE52FF231B648EDD00703FB5 /* WSProgressHUD.h */,
125+
FE52FF241B648EDD00703FB5 /* WSProgressHUD.m */,
112126
);
113127
path = WSProgressHUD;
114128
sourceTree = "<group>";
@@ -118,28 +132,22 @@
118132
children = (
119133
FED428F11B63E262002A5294 /* AppDelegate.h */,
120134
FED428F21B63E262002A5294 /* AppDelegate.m */,
121-
FED428F31B63E262002A5294 /* LaunchScreen.xib */,
122-
FED428F51B63E262002A5294 /* Main.storyboard */,
123-
FED428F71B63E262002A5294 /* image1.jpg */,
124-
FED428F81B63E262002A5294 /* image2.png */,
125-
FED428F91B63E262002A5294 /* Images.xcassets */,
126-
FED428FA1B63E262002A5294 /* IMG_6584.png */,
127-
FED428FB1B63E262002A5294 /* Info.plist */,
128-
FED428FC1B63E262002A5294 /* main.m */,
135+
FED429011B63E262002A5294 /* ViewController.h */,
136+
FED429021B63E262002A5294 /* ViewController.m */,
129137
FED428FD1B63E262002A5294 /* TabViewController1.h */,
130138
FED428FE1B63E262002A5294 /* TabViewController1.m */,
131139
FED428FF1B63E262002A5294 /* TabViewController2.h */,
132140
FED429001B63E262002A5294 /* TabViewController2.m */,
133-
FED429011B63E262002A5294 /* ViewController.h */,
134-
FED429021B63E262002A5294 /* ViewController.m */,
141+
FED428F51B63E262002A5294 /* Main.storyboard */,
142+
FE0FED181B647DB800E502BA /* Support file */,
135143
);
136144
path = WSProgressHUDDemo;
137145
sourceTree = "<group>";
138146
};
139147
FEDB74921B593589003DDB79 = {
140148
isa = PBXGroup;
141149
children = (
142-
FE1C9C291B645F0700BB2D67 /* WSProgressHUD */,
150+
FE52FF171B648EDD00703FB5 /* WSProgressHUD */,
143151
FED428F01B63E262002A5294 /* WSProgressHUDDemo */,
144152
FEDB74B71B593589003DDB79 /* WSProgressHUDTests */,
145153
FEDB749C1B593589003DDB79 /* Products */,
@@ -252,7 +260,7 @@
252260
isa = PBXResourcesBuildPhase;
253261
buildActionMask = 2147483647;
254262
files = (
255-
FE1C9C3B1B645F0700BB2D67 /* WSProgressBundle.bundle in Resources */,
263+
FE52FF291B648EDD00703FB5 /* WSProgressBundle.bundle in Resources */,
256264
FED429261B63E2A0002A5294 /* LaunchScreen.xib in Resources */,
257265
FED429271B63E2A0002A5294 /* Main.storyboard in Resources */,
258266
FED429281B63E2A0002A5294 /* Info.plist in Resources */,
@@ -278,15 +286,15 @@
278286
isa = PBXSourcesBuildPhase;
279287
buildActionMask = 2147483647;
280288
files = (
281-
FE1C9C371B645F0700BB2D67 /* FBShimmeringLayer.m in Sources */,
289+
FE52FF251B648EDD00703FB5 /* FBShimmeringLayer.m in Sources */,
282290
FED429031B63E262002A5294 /* AppDelegate.m in Sources */,
283-
FE1C9C3C1B645F0700BB2D67 /* WSProgressHUD.m in Sources */,
291+
FE52FF2A1B648EDD00703FB5 /* WSProgressHUD.m in Sources */,
284292
FED4290E1B63E262002A5294 /* ViewController.m in Sources */,
285-
FE1C9C381B645F0700BB2D67 /* FBShimmeringView.m in Sources */,
293+
FE52FF261B648EDD00703FB5 /* FBShimmeringView.m in Sources */,
286294
FED4290D1B63E262002A5294 /* TabViewController2.m in Sources */,
287295
FED4290B1B63E262002A5294 /* main.m in Sources */,
288-
FE1C9C391B645F0700BB2D67 /* MMMaterialDesignSpinner.m in Sources */,
289-
FE1C9C3A1B645F0700BB2D67 /* WSIndefiniteAnimationView.m in Sources */,
296+
FE52FF271B648EDD00703FB5 /* MMMaterialDesignSpinner.m in Sources */,
297+
FE52FF281B648EDD00703FB5 /* WSIndefiniteAnimationView.m in Sources */,
290298
FED4290C1B63E262002A5294 /* TabViewController1.m in Sources */,
291299
);
292300
runOnlyForDeploymentPostprocessing = 0;

Demo/WSProgressHUD/WSProgressHUD.m

+4-2
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ - (void)showWithMaskType: (WSProgressHUDMaskType)maskType maskWithout: (WSProgre
297297

298298
- (void)showWithString: (NSString *)string maskType: (WSProgressHUDMaskType)maskType maskWithout: (WSProgressHUDMaskWithoutType)withoutType
299299
{
300-
NSAssert([NSThread mainThread], @"Show Must In main thread");
300+
NSAssert([NSThread mainThread], @"Show Must on main thread");
301301
objc_setAssociatedObject(self, @selector(maskType), @(maskType), OBJC_ASSOCIATION_ASSIGN);
302302
objc_setAssociatedObject(self, @selector(hudType), @(WSProgressHUDTypeStatus), OBJC_ASSOCIATION_ASSIGN);
303303
objc_setAssociatedObject(self, @selector(withoutType), @(withoutType), OBJC_ASSOCIATION_ASSIGN);
@@ -314,7 +314,7 @@ - (void)showWithString: (NSString *)string maskType: (WSProgressHUDMaskType)mask
314314

315315
- (void)showShimmeringString: (NSString *)string maskType: (WSProgressHUDMaskType)maskType maskWithout: (WSProgressHUDMaskWithoutType)withoutType
316316
{
317-
317+
NSAssert([NSThread mainThread], @"Show Must on main thread");
318318
objc_setAssociatedObject(self, @selector(maskType), @(maskType), OBJC_ASSOCIATION_ASSIGN);
319319
objc_setAssociatedObject(self, @selector(hudType), @(WSProgressHUDTypeString), OBJC_ASSOCIATION_ASSIGN);
320320
objc_setAssociatedObject(self, @selector(withoutType), @(withoutType), OBJC_ASSOCIATION_ASSIGN);
@@ -338,6 +338,7 @@ - (void)showShimmeringString: (NSString *)string maskType: (WSProgressHUDMaskTyp
338338

339339
- (void)showProgress:(CGFloat)progress status:(NSString*)string maskType:(WSProgressHUDMaskType)maskType maskWithout: (WSProgressHUDMaskWithoutType)withoutType
340340
{
341+
NSAssert([NSThread mainThread], @"Show Must on main thread");
341342
if (self.hudIsShowing && self.hudType == WSProgressHUDTypeProgress) {
342343
self.ringLayer.strokeEnd = progress;
343344
return;
@@ -360,6 +361,7 @@ - (void)showProgress:(CGFloat)progress status:(NSString*)string maskType:(WSProg
360361

361362
- (void)showImage:(UIImage *)image status:(NSString *)title maskType: (WSProgressHUDMaskType)maskType maskWithout: (WSProgressHUDMaskWithoutType)withoutType
362363
{
364+
NSAssert([NSThread mainThread], @"Show Must on main thread");
363365
objc_setAssociatedObject(self, @selector(maskType), @(maskType), OBJC_ASSOCIATION_ASSIGN);
364366
objc_setAssociatedObject(self, @selector(showImage), @(1), OBJC_ASSOCIATION_ASSIGN);
365367
objc_setAssociatedObject(self, @selector(hudType), @(WSProgressHUDTypeImage), OBJC_ASSOCIATION_ASSIGN);

Demo/WSProgressHUDDemo/ViewController.m

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ - (void)didReceiveMemoryWarning {
4343
// Dispose of any resources that can be recreated.
4444
}
4545
- (IBAction)show:(id)sender {
46-
46+
47+
// [WSProgressHUD setProgressHUDIndicatorStyle:WSProgressHUDIndicatorCustom];
4748
[WSProgressHUD showWithMaskType:WSProgressHUDMaskTypeBlack];
4849

4950
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.7 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@@ -59,6 +60,10 @@ - (IBAction)showShimmeringString:(id)sender {
5960
}
6061
- (IBAction)showWithString:(id)sender {
6162
[WSProgressHUD showWithStatus:@"Loading..." maskType:WSProgressHUDMaskTypeBlack maskWithout:WSProgressHUDMaskWithoutTabbar];
63+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.7 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
64+
[WSProgressHUD dismiss];
65+
});
66+
6267
}
6368
- (IBAction)showProgress:(id)sender {
6469
[self performSelector:@selector(increaseProgress) withObject:nil afterDelay:0.3f];

0 commit comments

Comments
 (0)