29 #import <Foundation/Foundation.h> 30 #import <UIKit/UIKit.h> 31 #import <CoreGraphics/CoreGraphics.h> 33 @protocol MBProgressHUDDelegate;
36 typedef NS_ENUM(NSInteger, MBProgressHUDMode) {
38 MBProgressHUDModeIndeterminate,
40 MBProgressHUDModeDeterminate,
42 MBProgressHUDModeDeterminateHorizontalBar,
44 MBProgressHUDModeAnnularDeterminate,
46 MBProgressHUDModeCustomView,
51 typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) {
53 MBProgressHUDAnimationFade,
55 MBProgressHUDAnimationZoom,
56 MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,
57 MBProgressHUDAnimationZoomIn
61 #ifndef MB_INSTANCETYPE 62 #if __has_feature(objc_instancetype) 63 #define MB_INSTANCETYPE instancetype 65 #define MB_INSTANCETYPE id 70 #if __has_feature(objc_arc) 71 #define MB_STRONG strong 73 #define MB_STRONG retain 78 #if __has_feature(objc_arc_weak) 80 #elif __has_feature(objc_arc) 81 #define MB_WEAK unsafe_unretained 83 #define MB_WEAK assign 87 #if NS_BLOCKS_AVAILABLE 88 typedef void (^MBProgressHUDCompletionBlock)();
126 + (
MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
141 + (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;
156 + (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;
172 + (NSArray *)allHUDsForView:(UIView *)view;
181 - (id)initWithWindow:(UIWindow *)window;
190 - (id)initWithView:(UIView *)view;
202 - (void)show:(BOOL)animated;
213 - (void)hide:(BOOL)animated;
225 - (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;
239 - (void)showWhileExecuting:(
SEL)method onTarget:(
id)target withObject:(
id)object animated:(BOOL)animated;
241 #if NS_BLOCKS_AVAILABLE 248 - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block;
255 - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion;
262 - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;
275 - (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
276 completionBlock:(MBProgressHUDCompletionBlock)completion;
281 @property (copy) MBProgressHUDCompletionBlock completionBlock;
290 @property (assign) MBProgressHUDMode
mode;
440 @property (atomic, assign, readonly) CGSize
size;
446 @property (assign, getter = isSquare) BOOL
square;
451 @protocol MBProgressHUDDelegate <NSObject>
488 @property (nonatomic, assign, getter = isAnnular) BOOL
annular;
513 @property (nonatomic,
MB_STRONG) UIColor *progressRemainingColor;
519 @property (nonatomic,
MB_STRONG) UIColor *progressColor;
float graceTime
Definition: MBProgressHUD.h:373
MBProgressHUDMode mode
Definition: MBProgressHUD.h:290
UIColor * progressTintColor
Definition: MBProgressHUD.h:477
NSString * detailsLabelText
Definition: MBProgressHUD.h:323
BOOL removeFromSuperViewOnHide
Definition: MBProgressHUD.h:396
float margin
Definition: MBProgressHUD.h:351
Definition: MBProgressHUD.h:496
#define MB_INSTANCETYPE
Definition: MBProgressHUD.h:65
float cornerRadius
Definition: MBProgressHUD.h:357
float progress
Definition: MBProgressHUD.h:471
float opacity
Definition: MBProgressHUD.h:328
id< MBProgressHUDDelegate > delegate
Definition: MBProgressHUD.h:310
typedef NS_ENUM(NSInteger, MBProgressHUDMode)
Definition: MBProgressHUD.h:36
UIColor * detailsLabelColor
Definition: MBProgressHUD.h:416
UIColor * labelColor
Definition: MBProgressHUD.h:406
NSString * labelText
Definition: MBProgressHUD.h:317
Definition: MBProgressHUD.h:466
UIColor * color
Definition: MBProgressHUD.h:335
float xOffset
Definition: MBProgressHUD.h:340
UIView * customView
Definition: MBProgressHUD.h:303
BOOL annular
Definition: MBProgressHUD.h:488
CGSize size
Definition: MBProgressHUD.h:440
#define MB_WEAK
Definition: MBProgressHUD.h:83
UIFont * detailsLabelFont
Definition: MBProgressHUD.h:411
UIColor * activityIndicatorColor
Definition: MBProgressHUD.h:422
BOOL square
Definition: MBProgressHUD.h:446
UIFont * labelFont
Definition: MBProgressHUD.h:401
MBProgressHUDAnimation animationType
Definition: MBProgressHUD.h:297
BOOL taskInProgress
Definition: MBProgressHUD.h:390
CGSize minSize
Definition: MBProgressHUD.h:432
float yOffset
Definition: MBProgressHUD.h:345
float minShowTime
Definition: MBProgressHUD.h:380
BOOL dimBackground
Definition: MBProgressHUD.h:362
Definition: MBProgressHUD.h:111
float progress
Definition: MBProgressHUD.h:427
#define MB_STRONG
Definition: MBProgressHUD.h:73
UIColor * backgroundTintColor
Definition: MBProgressHUD.h:483