Skip to content

Commit 42fe146

Browse files
committed
Add MBProgressHUD+Additions
1 parent c7b8978 commit 42fe146

7 files changed

Lines changed: 147 additions & 163 deletions

File tree

Demo/Classes/HudDemoViewController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import <UIKit/UIKit.h>
10-
#import "MBProgressHUD.h"
10+
#import "MBProgressHUD+Additions.h"
1111

1212
@interface HudDemoViewController : UIViewController <MBProgressHUDDelegate> {
1313
MBProgressHUD *HUD;
@@ -27,6 +27,7 @@
2727
- (IBAction)showUsingBlocks:(id)sender;
2828
- (IBAction)showOnWindow:(id)sender;
2929
- (IBAction)showURL:(id)sender;
30+
- (IBAction)showToast:(id)sender;
3031

3132
- (void)myTask;
3233
- (void)myProgressTask;

Demo/Classes/HudDemoViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ - (IBAction)showURL:(id)sender {
186186
HUD.delegate = self;
187187
}
188188

189+
- (IBAction)showToast:(id)sender {
190+
[MBProgressHUD toastMessage:@"Hello !" andDuration:1.5];
191+
}
192+
189193

190194
- (IBAction)showWithGradient:(id)sender {
191195

Demo/HudDemo.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1313
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
1414
28D7ACF80DDB3853001CB0EB /* HudDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */; };
15+
636F451117C34F0B0033D46B /* MBProgressHUD+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 636F451017C34F0B0033D46B /* MBProgressHUD+Additions.m */; };
1516
D21D40801611CF6C005FCE55 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */; };
1617
D22F7D810F85241C00550BB3 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* MBProgressHUD.m */; };
1718
D277FDB311FC834200304321 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB211FC834200304321 /* Default.png */; };
@@ -35,6 +36,8 @@
3536
28D7ACF70DDB3853001CB0EB /* HudDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HudDemoViewController.m; sourceTree = "<group>"; usesTabs = 1; };
3637
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
3738
32CA4F630368D1EE00C91783 /* HudDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HudDemo_Prefix.pch; sourceTree = "<group>"; };
39+
636F450F17C34F0B0033D46B /* MBProgressHUD+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "MBProgressHUD+Additions.h"; path = "../../MBProgressHUD+Additions.h"; sourceTree = "<group>"; };
40+
636F451017C34F0B0033D46B /* MBProgressHUD+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "MBProgressHUD+Additions.m"; path = "../../MBProgressHUD+Additions.m"; sourceTree = "<group>"; };
3841
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3942
D21D407F1611CF6C005FCE55 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "Images/Default-568h@2x.png"; sourceTree = "<group>"; };
4043
D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBProgressHUD.h; path = ../MBProgressHUD.h; sourceTree = SOURCE_ROOT; };
@@ -67,6 +70,8 @@
6770
080E96DDFE201D6D7F000001 /* Classes */ = {
6871
isa = PBXGroup;
6972
children = (
73+
636F450F17C34F0B0033D46B /* MBProgressHUD+Additions.h */,
74+
636F451017C34F0B0033D46B /* MBProgressHUD+Additions.m */,
7075
D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */,
7176
D22F7D800F85241C00550BB3 /* MBProgressHUD.m */,
7277
1D3623240D0F684500981E51 /* HudDemoAppDelegate.h */,
@@ -226,6 +231,7 @@
226231
1D3623260D0F684500981E51 /* HudDemoAppDelegate.m in Sources */,
227232
28D7ACF80DDB3853001CB0EB /* HudDemoViewController.m in Sources */,
228233
D22F7D810F85241C00550BB3 /* MBProgressHUD.m in Sources */,
234+
636F451117C34F0B0033D46B /* MBProgressHUD+Additions.m in Sources */,
229235
);
230236
runOnlyForDeploymentPostprocessing = 0;
231237
};

0 commit comments

Comments
 (0)