Created
July 25, 2015 14:37
-
-
Save TheFinestArtist/1bc3d7e3d10ab4e50dce to your computer and use it in GitHub Desktop.
MBProgressHUD+Custom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MBProgressHUD+Custom.h | |
// | |
// Created by TheFinestArtist | |
// | |
#import <MBProgressHUD/MBProgressHUD.h> | |
@interface MBProgressHUD (Custom) | |
+ (void)showWithMessage:(NSString *)message toView:(UIView *)view; | |
+ (void)hideForView:(UIView *)view; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MBProgressHUD+Custom.m | |
// | |
// Created by TheFinestArtist | |
// | |
#import "MBProgressHUD+Custom.h" | |
#import "UIColor+Custom.h" | |
@implementation MBProgressHUD (Custom) | |
#pragma Hud Methods | |
+ (void)showWithMessage:(NSString *)message toView:(UIView *)view { | |
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; | |
hud.color = [UIColor navy:0.7]; | |
hud.labelText = NSLocalizedString(@"Loading", nil); | |
hud.detailsLabelText = message; | |
hud.yOffset = -40.0f; | |
} | |
+ (void)hideForView:(UIView *)view { | |
[MBProgressHUD hideAllHUDsForView:view animated:YES]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment