Permalink
Browse files

Follow through on name change.

Signed-off-by: Zachary Waldowski <zwaldowski@gmail.com>
  • Loading branch information...
1 parent 81eaaf8 commit efea9fd2b9aa6f2c502ecb2a416173b32ce5a8cd @zwaldowski committed Jun 18, 2012
View
@@ -66,11 +66,11 @@ typedef enum {
+ (void)showWithText:(NSString *)statusText whileExecuting:(void(^)(DZProgressController *))block;
/**
- * The view to be shown when the HUD is set to DZProgressHUDModeCustomView.
+ * The view to be shown when the HUD is set to DZProgressControllerModeCustomView.
* For best results, use a 37x37 pt view (so the bounds match the default indicator bounds).
*
- * Pass `DZProgressHUDSuccessImageView` for an image view with a check.
- * Pass `DZProgressHUDErrorImageView`, for an image view with an error symbol.
+ * Pass `DZProgressControllerSuccessView` for an image view with a check.
+ * Pass `DZProgressControllerErrorView`, for an image view with an error symbol.
**/
@property (nonatomic, strong) UIView *customView;
@@ -18,8 +18,8 @@
6C583A3414D8380D00219C4E /* success@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C583A3214D8380D00219C4E /* success@2x.png */; };
6C583A3D14D85F8C00219C4E /* error.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C583A3B14D85F8C00219C4E /* error.png */; };
6C583A3E14D85F8C00219C4E /* error@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C583A3C14D85F8C00219C4E /* error@2x.png */; };
+ 6C7552AA158E63A4002C65BC /* DZProgressController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C7552A9158E63A4002C65BC /* DZProgressController.m */; };
6CEB648414DE4AA900AD1AF6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CEB648314DE4AA900AD1AF6 /* QuartzCore.framework */; };
- D22F7D810F85241C00550BB3 /* DZProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* DZProgressHUD.m */; };
D277FDB311FC834200304321 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB211FC834200304321 /* Default.png */; };
D277FDB911FC877E00304321 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB711FC877E00304321 /* Icon.png */; };
D277FDBA11FC877E00304321 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D277FDB811FC877E00304321 /* Icon@2x.png */; };
@@ -40,10 +40,10 @@
6C583A3214D8380D00219C4E /* success@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "success@2x.png"; sourceTree = "<group>"; };
6C583A3B14D85F8C00219C4E /* error.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = error.png; sourceTree = "<group>"; };
6C583A3C14D85F8C00219C4E /* error@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "error@2x.png"; sourceTree = "<group>"; };
+ 6C7552A8158E63A4002C65BC /* DZProgressController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DZProgressController.h; sourceTree = "<group>"; };
+ 6C7552A9158E63A4002C65BC /* DZProgressController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DZProgressController.m; sourceTree = "<group>"; };
6CEB648314DE4AA900AD1AF6 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
8D1107310486CEB800E47090 /* HudDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "HudDemo-Info.plist"; sourceTree = "<group>"; };
- D22F7D7F0F85241C00550BB3 /* DZProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DZProgressHUD.h; sourceTree = "<group>"; };
- D22F7D800F85241C00550BB3 /* DZProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DZProgressHUD.m; sourceTree = "<group>"; };
D277FDB211FC834200304321 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
D277FDB711FC877E00304321 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
D277FDB811FC877E00304321 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
@@ -90,8 +90,8 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
- D22F7D7F0F85241C00550BB3 /* DZProgressHUD.h */,
- D22F7D800F85241C00550BB3 /* DZProgressHUD.m */,
+ 6C7552A8158E63A4002C65BC /* DZProgressController.h */,
+ 6C7552A9158E63A4002C65BC /* DZProgressController.m */,
D277FDBD11FC879500304321 /* Images */,
080E96DDFE201D6D7F000001 /* HudDemo */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
@@ -159,7 +159,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0450;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */;
compatibilityVersion = "Xcode 3.2";
@@ -207,7 +207,7 @@
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
28D7ACF80DDB3853001CB0EB /* HudDemoViewController.m in Sources */,
- D22F7D810F85241C00550BB3 /* DZProgressHUD.m in Sources */,
+ 6C7552AA158E63A4002C65BC /* DZProgressController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1,18 +1,19 @@
//
// HudDemoViewController.h
-// HudDemo
+// DZProgressController Demo
//
// (c) 2012 Zachary Waldowski.
+// (c) 2012 cocopon.
// (c) 2009-2011 Matej Bukovinski and contributors.
// This code is licensed under MIT. See LICENSE for more information.
//
#import <UIKit/UIKit.h>
-@class DZProgressHUD;
+@class DZProgressController;
@interface HudDemoViewController : UIViewController {
- DZProgressHUD *networkHUD;
+ DZProgressController *networkHUD;
long long expectedLength;
long long currentLength;
@@ -1,14 +1,15 @@
//
// HudDemoViewController.m
-// HudDemo
+// DZProgressController Demo
//
// (c) 2012 Zachary Waldowski.
+// (c) 2012 cocopon.
// (c) 2009-2011 Matej Bukovinski and contributors.
// This code is licensed under MIT. See LICENSE for more information.
//
#import "HudDemoViewController.h"
-#import "DZProgressHUD.h"
+#import "DZProgressController.h"
@implementation HudDemoViewController
@@ -22,7 +23,7 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
- (IBAction)showSimple:(id)sender {
// The hud will dispable all input on the view (use the higest view possible in the view hierarchy)
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
// Show the HUD while the provided block executes in the background
[HUD showWhileExecuting:^{
@@ -31,23 +32,22 @@ - (IBAction)showSimple:(id)sender {
}
- (IBAction)showWithLabel:(id)sender {
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
HUD.label.text = @"Loading";
[HUD showWhileExecuting:^{
sleep(3);
}];
}
- (IBAction)showWithLabelDeterminate:(id)sender {
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
// Set determinate mode
- HUD.mode = DZProgressHUDModeDeterminate;
+ HUD.mode = DZProgressControllerModeDeterminate;
HUD.label.text = @"Loading";
// myProgressTask uses the HUD instance to update progress
[HUD showWhileExecuting: ^{
- HUD.progress = 0.0f;
while (HUD.progress < 1.0f) {
usleep(1000000);
HUD.progress += 0.2f;
@@ -56,7 +56,7 @@ - (IBAction)showWithLabelDeterminate:(id)sender {
}
- (IBAction)showWithLabelMixed:(id)sender {
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
HUD.label.text = @"Connecting";
@@ -66,7 +66,7 @@ - (IBAction)showWithLabelMixed:(id)sender {
// Switch to determinate mode
[HUD performChanges: ^{
- HUD.mode = DZProgressHUDModeDeterminate;
+ HUD.mode = DZProgressControllerModeDeterminate;
HUD.label.text = @"Progress";
}];
@@ -80,15 +80,15 @@ - (IBAction)showWithLabelMixed:(id)sender {
// Back to indeterminate mode
[HUD performChanges: ^{
- HUD.mode = DZProgressHUDModeIndeterminate;
+ HUD.mode = DZProgressControllerModeIndeterminate;
HUD.label.text = @"Cleaning up";
}];
sleep(2);
[HUD performChanges: ^{
- HUD.customView = DZProgressHUDSuccessImageView;
- HUD.mode = DZProgressHUDModeCustomView;
+ HUD.customView = DZProgressControllerSuccessView;
+ HUD.mode = DZProgressControllerModeCustomView;
HUD.label.text = @"Completed";
}];
@@ -97,38 +97,38 @@ - (IBAction)showWithLabelMixed:(id)sender {
}
- (IBAction)showUsingBlocks:(id)sender {
- [DZProgressHUD showWithText:@"Loading" whileExecuting:^(DZProgressHUD *HUD){
+ [DZProgressController showWithText:@"Loading" whileExecuting:^(DZProgressController *HUD){
sleep(3);
}];
}
- (IBAction)showURL:(id)sender {
- NSURL *URL = [NSURL URLWithString:@"https://github.com/matej/DZProgressHUD/zipball/master"];
+ NSURL *URL = [NSURL URLWithString:@"https://github.com/zwaldowski/DZProgressHUD/zipball/master"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[connection start];
- networkHUD = [DZProgressHUD new];
+ networkHUD = [DZProgressController new];
[networkHUD show];
}
- (IBAction)showWithSuccess:(id)sender {
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
- HUD.customView = DZProgressHUDSuccessImageView;
- HUD.mode = DZProgressHUDModeCustomView;
+ HUD.customView = DZProgressControllerSuccessView;
+ HUD.mode = DZProgressControllerModeCustomView;
HUD.label.text = @"Completed";
[HUD show];
[HUD hide];
}
- (IBAction)showWithError:(id)sender {
- DZProgressHUD *HUD = [DZProgressHUD new];
+ DZProgressController *HUD = [DZProgressController new];
- HUD.mode = DZProgressHUDModeCustomView;
- HUD.customView = DZProgressHUDErrorImageView;
+ HUD.mode = DZProgressControllerModeCustomView;
+ HUD.customView = DZProgressControllerErrorView;
HUD.label.text = @"Failed";
[HUD show];
@@ -141,7 +141,7 @@ - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLRespon
expectedLength = [response expectedContentLength];
currentLength = 0;
[networkHUD performChanges:^{
- networkHUD.mode = DZProgressHUDModeDeterminate;
+ networkHUD.mode = DZProgressControllerModeDeterminate;
}];
}
@@ -152,16 +152,16 @@ - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
[networkHUD performChanges:^{
- networkHUD.customView = DZProgressHUDSuccessImageView;
- networkHUD.mode = DZProgressHUDModeCustomView;
+ networkHUD.customView = DZProgressControllerSuccessView;
+ networkHUD.mode = DZProgressControllerModeCustomView;
}];
[networkHUD hide];
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
[networkHUD performChanges:^{
- networkHUD.customView = DZProgressHUDErrorImageView;
- networkHUD.mode = DZProgressHUDModeCustomView;
+ networkHUD.customView = DZProgressControllerErrorView;
+ networkHUD.mode = DZProgressControllerModeCustomView;
}];
[networkHUD hide];
}
View
@@ -1,8 +1,9 @@
//
// main.m
-// HudDemo
+// DZProgressController Demo
//
// (c) 2012 Zachary Waldowski.
+// (c) 2012 cocopon.
// (c) 2009-2011 Matej Bukovinski and contributors.
// This code is licensed under MIT. See LICENSE for more information.
//

0 comments on commit efea9fd

Please sign in to comment.