MBProgressHUD+AppCategory.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // MBProgressHUD+AppCategory.h
  3. // Talk
  4. //
  5. // Created by qitewei on 2025/4/18.
  6. //
  7. #import "MBProgressHUD.h"
  8. extern const NSInteger AppHUDAutomaticallyHideSeconds;
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface MBProgressHUD (AppCategory)
  11. #pragma mark - Loading
  12. + (MBProgressHUD *)showLoadingInView:(UIView *)view;
  13. + (MBProgressHUD *)showLoadingInView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  14. + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text inView:(UIView *)view;
  15. + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  16. + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view;
  17. + (MBProgressHUD *)showLoadingWithText:(NSString * _Nullable)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  18. #pragma mark - Text
  19. + (MBProgressHUD *)showWithText:(NSString *)text;
  20. + (MBProgressHUD *)showWithText:(NSString *)text inView:(UIView *)view;
  21. + (MBProgressHUD *)showWithText:(NSString *)text inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  22. + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText;
  23. + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view;
  24. + (MBProgressHUD *)showWithText:(NSString *)text detailText:(NSString * _Nullable)detailText inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  25. #pragma mark - 带图标的提示
  26. + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon;
  27. + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon inView:(UIView *)view;
  28. + (MBProgressHUD *)showWithText:(NSString * _Nullable)text icon:(NSString * _Nullable)icon inView:(UIView *)view hideAfterDelay:(NSTimeInterval)delay;
  29. /// 隐藏 tips
  30. + (void)hideAllTipsInView:(UIView *)view;
  31. + (void)hideAllTips;
  32. /// 根据文本长度返回隐藏秒数,20字 2.0s,40字 2.5s,50字 3.0s,以上 3.5s
  33. + (NSTimeInterval)secondsToHideWithText:(NSString *)text;
  34. @end
  35. NS_ASSUME_NONNULL_END