Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Gray property to set background color to a gray (not black), and added a setCenter method #14

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
002acd4
added new gray property for background gray and setCenter so you can …
dhoerl Aug 17, 2011
bf688ff
Password and a animating info panel
dhoerl18 Aug 19, 2011
a22624b
More tweaks
dhoerl18 Aug 25, 2011
5b1546e
Lots of tweaks
dhoerl18 Oct 18, 2011
d6b3134
Good time
dhoerl18 Nov 4, 2011
4c697d0
Delegate is assign not retain
dhoerl Nov 21, 2011
d60d67f
ARCified
dhoerl Nov 22, 2011
bf9d85b
Fixed conflict
dhoerl Nov 22, 2011
2bfc669
Convert to ARC
dhoerl18 Nov 22, 2011
ea7b65d
NULL out the reference to ATMHud in ATMHudView in dealloc; create a n…
dhoerl18 Nov 30, 2011
188cf09
Fixed a bunch of things that analyze complained about
dhoerl18 Dec 2, 2011
8b4169a
Bug
dhoerl18 Dec 3, 2011
92386cc
About time to do it
dhoerl18 Dec 8, 2011
80e9a55
WOW - its sort of working as it should right now!
dhoerl18 Jan 6, 2012
583b5f0
Good time lots of changes to CART
dhoerl18 Feb 22, 2012
7de37f7
Reorganized the Account page, and tab bar
dhoerl18 Mar 17, 2012
c4525ad
Tweaked Initial Login to offer Password Reset if no password entered
dhoerl18 Mar 21, 2012
b3ae876
image fixes
dhoerl18 May 4, 2012
ecaf812
define controls whether sound available or not
dhoerl Aug 14, 2012
97263c3
updated
dhoerl Aug 14, 2012
43fcf46
Updated for iOS7
dhoerl Dec 2, 2013
5a8d9e2
small tweaks
dhoerl Dec 4, 2013
e6332f8
Updates
dhoerl Feb 11, 2014
dd9c108
Updates
dhoerl Feb 11, 2014
c520d76
Updates
dhoerl Feb 11, 2014
adfc273
Updates
dhoerl Feb 11, 2014
f062879
Updates
dhoerl Feb 11, 2014
a4f3e27
Updates
dhoerl Feb 11, 2014
ef7ef35
Major tweaking - easier to use start and stop, block delegate etc
dhoerl Feb 14, 2014
e942331
Formatting, debugged the blockDelegate
dhoerl Feb 18, 2014
3bdbc2a
More tweaks
dhoerl Feb 20, 2014
970a303
Podspec change
dhoerl Feb 20, 2014
a11e44e
Got one tags to show in the table!
Sep 29, 2014
0e0a2f9
Load testing with real clients
Feb 1, 2016
b169ee3
Version 5
Feb 9, 2016
e19ed95
Web view, hyper jumping in lists, Sent Mail
Feb 10, 2016
722a9ec
Update the UI to a more modern look
Feb 15, 2016
6d6c5c7
Few tweaks, cleanup
Feb 15, 2016
f6c8055
Notes
Feb 15, 2016
d735367
Build 6
Feb 17, 2016
b6b73fb
Put old radius back. made some manifest constants
Feb 17, 2016
9561626
Thr night
dhoerl Feb 18, 2016
331294a
Parallax, Circular Progress Indicator
dhoerl Feb 21, 2016
1ea3c79
Remove a few comments
dhoerl Feb 21, 2016
caaf3fc
Almost done with Sliding Menu
dhoerl Feb 23, 2016
ccaca8b
Sliding Menu pretty much done!
Mar 2, 2016
e50e054
Blank slate to logged in with client choice working.
Mar 17, 2016
01e7ee0
Update to 7.3 (selectors, ranges, bug fixes)
Mar 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
16 changes: 8 additions & 8 deletions ATMHud-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIPrerenderedIcon</key>
<true/>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
Expand All @@ -17,8 +10,13 @@
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -33,5 +31,7 @@
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</plist>
188 changes: 108 additions & 80 deletions ATMHud.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,104 +4,132 @@
*
* Created by Marcel Müller on 2011-03-01.
* Copyright (c) 2010-2011, Marcel Müller (atomcraft)
* Copyright (c) 2012-2014, David Hoerl
* All rights reserved.
*
* https://github.com/atomton/ATMHud
* https://github.com/atomton/ATMHud (original)
*/

#import <UIKit/UIKit.h>
@class ATMHudView, ATMSoundFX, ATMHudQueueItem;

#import "ATMProgressLayer.h" // For the style enum

@class ATMHud, ATMHudQueueItem;
#ifdef ATM_SOUND
@class ATMSoundFX;
#endif
@protocol ATMHudDelegate;

typedef enum {
typedef NS_ENUM(NSInteger, ATMHudAccessoryPosition) {
ATMHudAccessoryPositionTop = 0,
ATMHudAccessoryPositionRight,
ATMHudAccessoryPositionBottom,
ATMHudAccessoryPositionLeft
} ATMHudAccessoryPosition;

@interface ATMHud : UIViewController {
CGFloat margin;
CGFloat padding;
CGFloat alpha;
CGFloat appearScaleFactor;
CGFloat disappearScaleFactor;
CGFloat progressBorderRadius;
CGFloat progressBorderWidth;
CGFloat progressBarRadius;
CGFloat progressBarInset;

CGPoint center;

BOOL shadowEnabled;
BOOL blockTouches;
BOOL allowSuperviewInteraction;

NSString *showSound;
NSString *updateSound;
NSString *hideSound;

id <ATMHudDelegate> delegate;
ATMHudAccessoryPosition accessoryPosition;

@private
ATMHudView *__view;
ATMSoundFX *sound;
NSMutableArray *displayQueue;
NSInteger queuePosition;
}

@property (nonatomic, assign) CGFloat margin;
@property (nonatomic, assign) CGFloat padding;
@property (nonatomic, assign) CGFloat alpha;
@property (nonatomic, assign) CGFloat appearScaleFactor;
@property (nonatomic, assign) CGFloat disappearScaleFactor;
@property (nonatomic, assign) CGFloat progressBorderRadius;
@property (nonatomic, assign) CGFloat progressBorderWidth;
@property (nonatomic, assign) CGFloat progressBarRadius;
@property (nonatomic, assign) CGFloat progressBarInset;

@property (nonatomic, assign) CGPoint center;

@property (nonatomic, assign) BOOL shadowEnabled;
@property (nonatomic, assign) BOOL blockTouches;
@property (nonatomic, assign) BOOL allowSuperviewInteraction;

@property (nonatomic, retain) NSString *showSound;
@property (nonatomic, retain) NSString *updateSound;
@property (nonatomic, retain) NSString *hideSound;

@property (nonatomic, assign) id <ATMHudDelegate> delegate;
@property (nonatomic, assign) ATMHudAccessoryPosition accessoryPosition;

@property (nonatomic, retain) ATMHudView *__view;
@property (nonatomic, retain) ATMSoundFX *sound;
@property (nonatomic, retain) NSMutableArray *displayQueue;
@property (nonatomic, assign) NSInteger queuePosition;

+ (NSString *)buildInfo;

- (id)initWithDelegate:(id)hudDelegate;

- (void)setCaption:(NSString *)caption;
- (void)setImage:(UIImage *)image;
- (void)setActivity:(BOOL)activity;
- (void)setActivityStyle:(UIActivityIndicatorViewStyle)activityStyle;
- (void)setFixedSize:(CGSize)fixedSize;
- (void)setProgress:(CGFloat)progress;
};

// See DemoViewController for blockDelegate usage
typedef NS_ENUM(NSInteger, ATMHudAction) {
ATMHudActionUserDidTapHud, // actual HUD
ATMHudActionUserDidTapOutsideHud, // somewhere else in the view

ATMHudActionWillAppear,
ATMHudActionDidAppear,
ATMHudActionWillUpdate,
ATMHudActionDidUpdate,
ATMHudActionWillDisappear,
ATMHudActionDidDisappear,

// add your own functionality to the blockDelegate, for instance to dismiss an action sheet
ATMHudActionUsrAction1,
ATMHudActionUsrAction2,
ATMHudActionUsrAction3,
ATMHudActionUsrAction4,
};


NS_ASSUME_NONNULL_BEGIN

typedef void (^ATMblockDelegate)(ATMHudAction msg, ATMHud *hud);

@interface ATMHud : UIViewController
// Properties persist from show to show
@property (nonatomic, assign) CGFloat margin; // default 10.0f
@property (nonatomic, assign) CGFloat padding; // default 10.0f
@property (nonatomic, assign) CGFloat alpha; // default 0.8f
@property (nonatomic, assign) CGFloat gray; // default 0.8f
@property (nonatomic, assign) CGFloat animateDuration; // default 0.1f
@property (nonatomic, assign) CGFloat progressBorderRadius; // default 8.0f
@property (nonatomic, assign) ATMHudProgressStyle progressStyle; // default ATMHudProgressStyleBar. Must set before the HudView is created.
@property (nonatomic, assign) CGFloat progressBorderWidth; // default 2.0f
@property (nonatomic, assign) CGFloat progressRadius; // default 5.0f
@property (nonatomic, assign) CGFloat progressInset; // default 3.0f
@property (nonatomic, assign) CGFloat appearScaleFactor; // default 0.8;
@property (nonatomic, assign) CGFloat disappearScaleFactor; // default 5.0f
@property (nonatomic, assign) NSTimeInterval minShowTime; // default 0 sec - do not hide even if told to until this much time elapses
// to insure HUD visible at least this long
// set "minShowTime" before "show" , then send show, then send hide
@property (nonatomic, assign) CGPoint center; // default {0, 0} - clients can place the HUD center above or below the real view centerpoint
@property (nonatomic, assign) BOOL shadowEnabled; // default NO
@property (nonatomic, assign) BOOL usesParallax; // default YES
@property (nonatomic, assign) CGFloat backgroundAlpha; // default 0.0f; applied as [UIColor colorWithWhite:backgroundAlpha alpha:backgroundAlpha];
@property (nonatomic, strong) UIColor *hudBackgroundColor; // default is a light slightly blue color

@property (nonatomic, weak) id <ATMHudDelegate> delegate; // traditional delegate
@property (nonatomic, copy) ATMblockDelegate blockDelegate; // block delegate
@property (nonatomic, copy, nullable) void (^convenienceBlock)(); // ATMHud will keep this block around for you
#ifdef ATM_SOUND
@property (nonatomic, strong) ATMSoundFX *sound;
#endif
@property (nonatomic, assign, readonly) NSUInteger queuePosition; // item which is showing

+ (NSString *)version;

- (instancetype)initWithDelegate:(id)hudDelegate;

// These variables are reset after each hide
- (void)setCaption:(NSString *)caption; // Reset to @"" after each hide
- (void)setImage:(UIImage * _Nullable )image; // Reset to nil
- (void)setActivity:(BOOL)activity; // Reset to NO
- (void)setActivityStyle:(UIActivityIndicatorViewStyle)activityStyle; // Reset to UIActivityIndicatorViewStyleWhite
- (void)setAccessoryPosition:(ATMHudAccessoryPosition)pos; // Reset to ATMHudAccessoryPositionBottom
- (void)setFixedSize:(CGSize)fixedSize; // Reset to CGSizeZero
- (void)setProgress:(CGFloat)progress; // Reset to 0
- (void)setCenter:(CGPoint)pt; // Reset to CGPointZero
- (void)setBlockTouches:(BOOL)val; // Reset to NO
- (void)setAllowSuperviewInteraction:(BOOL)val; // Reset to NO
#ifdef ATM_SOUND
- (void)setShowSound:(NSString *)sound; // Reset to nil
- (void)setUpdateSound:(NSString *)sound; // Reset to nil
- (void)setHideSound:(NSString *)sound; // Reset to nil
#endif

- (ATMHudAccessoryPosition)accessoryPosition;
- (BOOL)allowSuperviewInteraction;
#ifdef ATM_SOUND
- (NSString *)showSound;
- (NSString *)updateSound;
- (NSString *)hideSound;
#endif

- (void)addQueueItem:(ATMHudQueueItem *)item;
- (void)addQueueItems:(NSArray *)items;
- (void)addQueueItems:(NSArray<ATMHudQueueItem *> *)items;
- (void)clearQueue;
- (void)startQueue;
- (void)startQueueInView:(UIView *)view;
- (void)showNextInQueue;
- (void)showQueueAtIndex:(NSInteger)index;

- (void)show;
- (void)showInView:(UIView *)view;
- (void)update;
- (void)hide;
- (void)hideAfter:(NSTimeInterval)delay;
- (void)hide; // Ordered removal. Note: now removes the hudView from its superview
- (void)unloadView; // Blunt force removal. Do not call hide.


- (void)show __attribute__((deprecated)); // use showInView
- (void)hideAfter:(NSTimeInterval)delay __attribute__((deprecated)); // set "minShowTime" before "show" , then show, then send "hide"

#ifdef ATM_SOUND
- (void)playSound:(NSString *)soundPath;
#endif

@end

NS_ASSUME_NONNULL_END
Loading