Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
I lost all of my commits...
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardtack committed Jun 30, 2013
1 parent e2bdb41 commit 25f98ba
Show file tree
Hide file tree
Showing 33 changed files with 1,932 additions and 12 deletions.
15 changes: 15 additions & 0 deletions .gitignore
@@ -0,0 +1,15 @@
.DS_Store
*.swp
*~.nib
build/
*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3
*.mode2v3
Documentation/Generated
doxygenWarnings.txt
*.xcuserdatad
Issue.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Issue.xcodeproj/xcuserdata/*
Podfile.lock
71 changes: 61 additions & 10 deletions HTProgressHUD.xcodeproj/project.pbxproj
Expand Up @@ -8,8 +8,13 @@

/* Begin PBXBuildFile section */
237D2A7217805E1D004B696F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 237D2A7117805E1D004B696F /* Foundation.framework */; };
237D2A7717805E1D004B696F /* HTProgressHUD.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 237D2A7617805E1D004B696F /* HTProgressHUD.h */; };
237D2A7917805E1D004B696F /* HTProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A7817805E1D004B696F /* HTProgressHUD.m */; };
237D2A8D17805E32004B696F /* HTProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8017805E32004B696F /* HTProgressHUD.m */; };
237D2A8E17805E32004B696F /* HTProgressHUDAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8217805E32004B696F /* HTProgressHUDAnimation.m */; };
237D2A8F17805E32004B696F /* HTProgressHUDFadeAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8417805E32004B696F /* HTProgressHUDFadeAnimation.m */; };
237D2A9017805E32004B696F /* HTProgressHUDFadeZoomAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8617805E32004B696F /* HTProgressHUDFadeZoomAnimation.m */; };
237D2A9117805E32004B696F /* HTProgressHUDIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8817805E32004B696F /* HTProgressHUDIndicatorView.m */; };
237D2A9217805E32004B696F /* HTProgressHUDPieIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8A17805E32004B696F /* HTProgressHUDPieIndicatorView.m */; };
237D2A9317805E32004B696F /* HTProgressHUDRingIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237D2A8C17805E32004B696F /* HTProgressHUDRingIndicatorView.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -19,7 +24,6 @@
dstPath = "include/${PRODUCT_NAME}";
dstSubfolderSpec = 16;
files = (
237D2A7717805E1D004B696F /* HTProgressHUD.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -29,8 +33,20 @@
237D2A6E17805E1D004B696F /* libHTProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHTProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; };
237D2A7117805E1D004B696F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
237D2A7517805E1D004B696F /* HTProgressHUD-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HTProgressHUD-Prefix.pch"; sourceTree = "<group>"; };
237D2A7617805E1D004B696F /* HTProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTProgressHUD.h; sourceTree = "<group>"; };
237D2A7817805E1D004B696F /* HTProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUD.m; sourceTree = "<group>"; };
237D2A7F17805E32004B696F /* HTProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUD.h; sourceTree = "<group>"; };
237D2A8017805E32004B696F /* HTProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUD.m; sourceTree = "<group>"; };
237D2A8117805E32004B696F /* HTProgressHUDAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDAnimation.h; sourceTree = "<group>"; };
237D2A8217805E32004B696F /* HTProgressHUDAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDAnimation.m; sourceTree = "<group>"; };
237D2A8317805E32004B696F /* HTProgressHUDFadeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDFadeAnimation.h; sourceTree = "<group>"; };
237D2A8417805E32004B696F /* HTProgressHUDFadeAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDFadeAnimation.m; sourceTree = "<group>"; };
237D2A8517805E32004B696F /* HTProgressHUDFadeZoomAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDFadeZoomAnimation.h; sourceTree = "<group>"; };
237D2A8617805E32004B696F /* HTProgressHUDFadeZoomAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDFadeZoomAnimation.m; sourceTree = "<group>"; };
237D2A8717805E32004B696F /* HTProgressHUDIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDIndicatorView.h; sourceTree = "<group>"; };
237D2A8817805E32004B696F /* HTProgressHUDIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDIndicatorView.m; sourceTree = "<group>"; };
237D2A8917805E32004B696F /* HTProgressHUDPieIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDPieIndicatorView.h; sourceTree = "<group>"; };
237D2A8A17805E32004B696F /* HTProgressHUDPieIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDPieIndicatorView.m; sourceTree = "<group>"; };
237D2A8B17805E32004B696F /* HTProgressHUDRingIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTProgressHUDRingIndicatorView.h; sourceTree = "<group>"; };
237D2A8C17805E32004B696F /* HTProgressHUDRingIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTProgressHUDRingIndicatorView.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -73,8 +89,10 @@
237D2A7317805E1D004B696F /* HTProgressHUD */ = {
isa = PBXGroup;
children = (
237D2A7617805E1D004B696F /* HTProgressHUD.h */,
237D2A7817805E1D004B696F /* HTProgressHUD.m */,
237D2A7F17805E32004B696F /* HTProgressHUD.h */,
237D2A8017805E32004B696F /* HTProgressHUD.m */,
237D2A9417805E3B004B696F /* Animations */,
237D2A9517805E41004B696F /* Indicators */,
237D2A7417805E1D004B696F /* Supporting Files */,
);
path = HTProgressHUD;
Expand All @@ -88,6 +106,32 @@
name = "Supporting Files";
sourceTree = "<group>";
};
237D2A9417805E3B004B696F /* Animations */ = {
isa = PBXGroup;
children = (
237D2A8117805E32004B696F /* HTProgressHUDAnimation.h */,
237D2A8217805E32004B696F /* HTProgressHUDAnimation.m */,
237D2A8317805E32004B696F /* HTProgressHUDFadeAnimation.h */,
237D2A8417805E32004B696F /* HTProgressHUDFadeAnimation.m */,
237D2A8517805E32004B696F /* HTProgressHUDFadeZoomAnimation.h */,
237D2A8617805E32004B696F /* HTProgressHUDFadeZoomAnimation.m */,
);
name = Animations;
sourceTree = "<group>";
};
237D2A9517805E41004B696F /* Indicators */ = {
isa = PBXGroup;
children = (
237D2A8717805E32004B696F /* HTProgressHUDIndicatorView.h */,
237D2A8817805E32004B696F /* HTProgressHUDIndicatorView.m */,
237D2A8917805E32004B696F /* HTProgressHUDPieIndicatorView.h */,
237D2A8A17805E32004B696F /* HTProgressHUDPieIndicatorView.m */,
237D2A8B17805E32004B696F /* HTProgressHUDRingIndicatorView.h */,
237D2A8C17805E32004B696F /* HTProgressHUDRingIndicatorView.m */,
);
name = Indicators;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -139,7 +183,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
237D2A7917805E1D004B696F /* HTProgressHUD.m in Sources */,
237D2A8D17805E32004B696F /* HTProgressHUD.m in Sources */,
237D2A8E17805E32004B696F /* HTProgressHUDAnimation.m in Sources */,
237D2A8F17805E32004B696F /* HTProgressHUDFadeAnimation.m in Sources */,
237D2A9017805E32004B696F /* HTProgressHUDFadeZoomAnimation.m in Sources */,
237D2A9117805E32004B696F /* HTProgressHUDIndicatorView.m in Sources */,
237D2A9217805E32004B696F /* HTProgressHUDPieIndicatorView.m in Sources */,
237D2A9317805E32004B696F /* HTProgressHUDRingIndicatorView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -170,7 +220,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand All @@ -193,7 +243,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -242,6 +292,7 @@
237D2A7E17805E1D004B696F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions HTProgressHUD.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 103 additions & 2 deletions HTProgressHUD/HTProgressHUD.h
Expand Up @@ -6,8 +6,109 @@
// Copyright (c) 2013년 Hardtack. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface HTProgressHUD : NSObject
@class HTProgressHUDAnimation;

/**
* Positions for HTProgressHUD
*/
typedef enum {
HTProgressHUDPositionTopLeft,
HTProgressHUDPositionTopCenter,
HTProgressHUDPositionTopRight,
HTProgressHUDPositionCenterLeft,
HTProgressHUDPositionCenter,
HTProgressHUDPositionCenterRight,
HTProgressHUDPositionBottomLeft,
HTProgressHUDPositionBottomCenter,
HTProgressHUDPositionBottomRight,
} HTProgressHUDPosition;

@class HTProgressHUD;
@class HTProgressHUDIndicatorView;

/**
* Protocol for UIView that handles changing of HUD's progress value.
* You can customize progress animation by implementing this protocol.
*/
@protocol HTProgressHUDProgressHandling <NSObject>
@required
- (void)progressHUD:(HTProgressHUD *)progressHUD didChangeProgressValue:(float)progress;

@end

/**
* General-purpose delegate for HTProgressHUD.
*/
@protocol HTProgressHUDDelegate <NSObject>

@optional
- (void)progressHUD:(HTProgressHUD *)progressHUD willBeShownInView:(UIView *)view;
- (void)progressHUD:(HTProgressHUD *)progressHUD wasShownInView:(UIView *)view;
- (void)progressHUDDidChange:(HTProgressHUD *)progressHUD;
- (void)progressHUD:(HTProgressHUD *)progressHUD willBeHiddenFromView:(UIView *)view;
- (void)progressHUD:(HTProgressHUD *)progressHUD wasHiddenInView:(UIView *)view;

@end

@interface HTProgressHUD : UIView

// View's materials
@property (nonatomic, strong) UIView *hudView; // Actual HUD view.
@property (nonatomic, strong) UILabel *textLabel; // Default text label.

// View Appearance Options
@property (nonatomic, strong) HTProgressHUDIndicatorView *indicatorView; // Default is indicator view with UIActivityIndicatorView

// View Hierachy Options
@property (nonatomic) BOOL addToViewOnShow; // Default is YES;
@property (nonatomic) BOOL removeFromSuperviewOnHide; // Default is YES;

// Layout Options
@property (nonatomic) UIEdgeInsets paddingInsets;
@property (nonatomic) UIEdgeInsets marginInsets;
@property (nonatomic) HTProgressHUDPosition position; // Default is HTProgressHUDPositionCenter

// Animation Options
@property (nonatomic, strong) HTProgressHUDAnimation *animation; // Default is fade animation
@property (nonatomic) NSTimeInterval layoutAnimationDuration; // Default is 0.3
@property (nonatomic, getter=shouldAnimateWhenLayoutChanged) BOOL animateWhenLayoutChanged; //Default is YES

// Data
@property (nonatomic) float progress;
@property (nonatomic, strong) NSString *text;

// Delegates
@property (nonatomic, weak) id<HTProgressHUDDelegate> delegate;

// Blocks
@property (nonatomic, copy) dispatch_block_t afterShowingBlock;
@property (nonatomic, copy) dispatch_block_t afterHidingBlock;

/* Initializers */
- (id)init;
- (id)initWithFrame:(CGRect)frame;

/* Progress HUD showing methods */
- (void)showInView:(UIView *)view; // Animated
- (void)showInView:(UIView *)view animated:(BOOL)animated;
- (void)showInRect:(CGRect)rect inView:(UIView *)view; // Animated
- (void)showInRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated;
// Selector based
- (void)showInView:(UIView *)view whileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
- (void)showInRect:(CGRect)rect inView:(UIView *)view whileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
// Invocation based
- (void)showInView:(UIView *)view whileExecutingInvocation:(NSInvocation *)invocation animated:(BOOL)animated;
- (void)showInRect:(CGRect)rect inView:(UIView *)view whileExecutingInvocation:(NSInvocation *)invocation animated:(BOOL)animated;
// Block based
- (void)showWithAnimation:(BOOL)animated inView:(UIView *)view whileExecutingBlock:(dispatch_block_t)block;
- (void)showWithAnimation:(BOOL)animated inRect:(CGRect)rect inView:(UIView *)view whileExecutingBlock:(dispatch_block_t)block;

/* Progress HUD hiding methods */
- (void)hide; // Animated
- (void)hideWithAnimation:(BOOL)animated;
- (void)hideAfterDelay:(NSTimeInterval)delay; // Animated
- (void)hideAfterDelay:(NSTimeInterval)delay animated:(BOOL)animated;

@end

0 comments on commit 25f98ba

Please sign in to comment.