BGHUDHelper.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // BGHUDHelper.h
  3. //
  4. //
  5. // Created by Alexi on 12-11-28.
  6. // Copyright (c) 2012年 . All rights reserved.
  7. //
  8. #import "MBProgressHUD.h"
  9. #import "NSObject+CommonBlock.h"
  10. @interface BGHUDHelper : NSObject
  11. {
  12. @private
  13. MBProgressHUD *_syncHUD;
  14. }
  15. + (BGHUDHelper *)sharedInstance;
  16. + (void)alert:(NSString *)msg;
  17. + (void)alert:(NSString *)msg action:(FWVoidBlock)action;
  18. + (void)alert:(NSString *)msg cancel:(NSString *)cancel;
  19. + (void)alert:(NSString *)msg cancel:(NSString *)cancel action:(FWVoidBlock)action;
  20. + (void)alertTitle:(NSString *)title message:(NSString *)msg cancel:(NSString *)cancel;
  21. + (void)alertTitle:(NSString *)title message:(NSString *)msg cancel:(NSString *)cancel action:(FWVoidBlock)action;
  22. // 网络请求
  23. - (MBProgressHUD *)loading;
  24. - (MBProgressHUD *)loading:(NSString *)msg;
  25. - (MBProgressHUD *)loading:(NSString *)msg inView:(UIView *)view;
  26. - (void)loading:(NSString *)msg delay:(CGFloat)seconds execute:(void (^)())exec completion:(void (^)())completion;
  27. - (void)stopLoading:(MBProgressHUD *)hud;
  28. - (void)stopLoading:(MBProgressHUD *)hud message:(NSString *)msg;
  29. - (void)stopLoading:(MBProgressHUD *)hud message:(NSString *)msg delay:(CGFloat)seconds completion:(void (^)())completion;
  30. - (void)tipMessage:(NSString *)msg;
  31. - (void)tipMessage:(NSString *)msg delay:(CGFloat)seconds;
  32. - (void)tipMessage:(NSString *)msg delay:(CGFloat)seconds completion:(void (^)())completion;
  33. // 网络请求
  34. - (void)syncLoading;
  35. - (void)syncLoading:(NSString *)msg;
  36. - (void)syncLoading:(NSString *)msg inView:(UIView *)view;
  37. - (void)syncStopLoading;
  38. - (void)syncStopLoadingMessage:(NSString *)msg;
  39. - (void)syncStopLoadingMessage:(NSString *)msg delay:(CGFloat)seconds completion:(void (^)())completion;
  40. @end