酷店

MBProgressHUD+KDPCategory.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // MBProgressHUD+KDPCategory.h
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/4.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "MBProgressHUD.h"
  9. //统一的显示时长
  10. #define kHudShowTime 1.5
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface MBProgressHUD (KDPCategory)
  13. #pragma mark 在指定的view上显示hud
  14. + (void)show:(NSString *)text icon:(NSString *)icon view:(UIView *)view;
  15. + (void)showMessage:(NSString *)message toView:(UIView *)view;
  16. + (void)showSuccess:(NSString *)success toView:(UIView *)view;
  17. + (void)showError:(NSString *)error toView:(UIView *)view;
  18. + (void)showWarning:(NSString *)Warning toView:(UIView *)view;
  19. + (void)showMessageWithImageName:(NSString *)imageName message:(NSString *)message toView:(UIView *)view;
  20. + (MBProgressHUD *)showActivityMessage:(NSString*)message view:(UIView *)view;
  21. + (MBProgressHUD *)showProgressBarToView:(UIView *)view;
  22. + (void)showView:(UIView *)view;
  23. #pragma mark 在window上显示hud
  24. + (void)showMessage:(NSString *)message;
  25. + (void)showSuccess:(NSString *)success;
  26. + (void)showError:(NSString *)error;
  27. + (void)showWarning:(NSString *)Warning;
  28. + (void)showMessageWithImageName:(NSString *)imageName message:(NSString *)message;
  29. + (MBProgressHUD *)showActivityMessage:(NSString*)message;
  30. #pragma mark 移除hud
  31. + (void)hideHUDForView:(UIView *)view;
  32. + (void)hideHUD;
  33. @end
  34. NS_ASSUME_NONNULL_END