| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // MBProgressHUD+AppCategory.h
- // Talk
- //
- // Created by qitewei on 2025/4/18.
- //
- #import "MBProgressHUD.h"
- extern const NSInteger AppHUDAutomaticallyHideSeconds;
- NS_ASSUME_NONNULL_BEGIN
- @interface MBProgressHUD (AppCategory)
- #pragma mark - Loading
- + (MBProgressHUD *)showLoadingInView:(UIView *)view;
- + (MBProgressHUD *)showLoadingInView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text inView:(UIView *)view;
- + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view;
- + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- #pragma mark - Text
- + (MBProgressHUD *)showWithText:(NSString *)text;
- + (MBProgressHUD *)showWithText:(NSString *)text inView:(UIView *)view;
- + (MBProgressHUD *)showWithText:(NSString *)text inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText;
- + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view;
- + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- #pragma mark - 带图标的提示
- + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon;
- + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon inView:(UIView *)view;
- + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
- /// 隐藏 tips
- + (void)hideAllTipsInView:(UIView *)view;
- + (void)hideAllTips;
- /// 根据文本长度返回隐藏秒数,20字 2.0s,40字 2.5s,50字 3.0s,以上 3.5s
- + (NSTimeInterval)secondsToHideWithText:(NSString *)text;
- @end
- NS_ASSUME_NONNULL_END
|