Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

MBProgressHUD static

View gist:51201edcc84853e88c7c
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
static MBProgressHUD *__hud = nil;
 
+ (MBProgressHUD *)showGlobalProgressHUDWithTitle:(NSString *)title {
UIWindow *window = [[[UIApplication sharedApplication] windows] lastObject];
if (!__hud) {
__hud = [[MBProgressHUD alloc] initWithView:window];
}
__hud.labelText = title;
[window addSubview:__hud];
[__hud show:animated];
return hud;
}
 
+ (void)dismissGlobalHUD {
hud.removeFromSuperViewOnHide = YES;
[hud hide:animated];
[MBProgressHUD hideHUDForView:window animated:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.