12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // MBProgressHUD+Extension.h
- // Starbuds
- //
- // Created by 翟玉磊 on 2020/1/17.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import "MBProgressHUD.h"
- // 统一的显示时长
- #define kHudShowTime 1.5
- NS_ASSUME_NONNULL_BEGIN
- @interface MBProgressHUD (Extension)
- #pragma mark 在指定的view上显示hud
- + (void)showMessage:(NSString *)message toView:(UIView * _Nullable)view;
- + (void)showSuccess:(NSString *)success toView:(UIView * _Nullable)view;
- + (void)showError:(NSString *)error toView:(UIView * _Nullable)view;
- + (void)showWarning:(NSString *)Warning toView:(UIView * _Nullable)view;
- + (void)showMessageWithImageName:(NSString * _Nullable)imageName message:(NSString *)message toView:(UIView * _Nullable)view;
- + (MBProgressHUD *)showActivityMessage:(NSString*)message view:(UIView * _Nullable)view;
- + (MBProgressHUD *)showProgressBarToView:(UIView * _Nullable)view;
- #pragma mark 在window上显示hud
- + (void)showMessage:(NSString *)message;
- + (void)showSuccess:(NSString *)success;
- + (void)showError:(NSString *)error;
- + (void)showWarning:(NSString *)Warning;
- + (void)showMessageWithImageName:(NSString * _Nullable)imageName message:(NSString *)message;
- + (MBProgressHUD *)showActivityMessage:(NSString*)message;
- #pragma mark 移除hud
- + (void)hideHUDForView:(UIView * _Nullable)view;
- + (void)hideHUD;
- @end
- NS_ASSUME_NONNULL_END
|