forked from Beniamiiin/MBProgressHUDExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIViewController+MBProgressHUD.h
51 lines (42 loc) · 1.29 KB
/
UIViewController+MBProgressHUD.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* UIViewController+MBProgressHUD.h
*
* Created by Adam Duke on 10/20/11.
* Copyright 2011 appRenaissance, LLC. All rights reserved.
*
*/
#import "MBProgressHUD.h"
#import <UIKit/UIKit.h>
@interface UIViewController (MBProgressHUD) <MBProgressHUDDelegate>
typedef void (^HUDFinishedHandler)();
/*
* Shows an MBProgressHUD with the default spinner
* The HUD is added as a subview to this view
* controller's parentViewController.view.
*/
- (void)showHUD;
/*
* Shows an MBProgressHUD with the default spinner
* and sets the label text beneath the spinner
* to the given message. The HUD is added as a subview
* to this view controller's parentViewController.view.
*/
- (void)showHUDWithMessage:(NSString *)message;
/*
* Dismisses the currently displayed HUD.
*/
- (void)hideHUD;
/*
* Changes the currently displayed HUD's label text to
* the given message and then dismisses the HUD after a
* short delay.
*/
- (void)hideHUDWithCompletionMessage:(NSString *)message;
/*
* Changes the currently displayed HUD's label text to
* the given message and then dismisses the HUD after a
* short delay. Additionally, runs the given completion
* block after the HUD hides.
*/
- (void)hideHUDWithCompletionMessage:(NSString *)message finishedHandler:(HUDFinishedHandler)finishedHandler;
@end