UIView+GHBlank.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // UIView+GHBlank.h
  3. // GameHelper
  4. //
  5. // Created by 青秀斌 on 16/12/29.
  6. // Copyright © 2016年 kylincc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef enum {
  10. BlankType_NoData,
  11. BlankType_NoNetWork,
  12. BlankType_LoadFailure,
  13. }BlankType;
  14. @interface UIView (GHBlank)
  15. - (void)showBlankWithImage:(nullable NSString *)image
  16. title:(nullable NSString *)title
  17. message:(nullable NSString *)message
  18. action:(nullable void (^)(void))action
  19. offsetY:(CGFloat)offsetY;
  20. - (void)showBlankWithImage:(nullable NSString *)image
  21. title:(nullable NSString *)title
  22. message:(nullable NSString *)message
  23. action:(nullable void (^)(void))action;
  24. - (void)showBlankWithType:(BlankType)type
  25. title:(nullable NSString *)title
  26. message:(nullable NSString *)message
  27. action:(nullable void (^)(void))action
  28. offsetY:(CGFloat)offsetY;
  29. - (void)showBlankWithType:(BlankType)type
  30. title:(nullable NSString *)title
  31. message:(nullable NSString *)message
  32. action:(nullable void (^)(void))action;
  33. - (void)dismissBlank;
  34. //暂无数据
  35. - (void)showBlankNoData:(nullable void (^)(void))action offsetY:(CGFloat)offsetY;
  36. - (void)showBlankNoData:(nullable void (^)(void))action;
  37. //网络断开
  38. - (void)showBlankNoNetWork:(nullable void (^)(void))action offsetY:(CGFloat)offsetY;
  39. - (void)showBlankNoNetWork:(nullable void (^)(void))action;
  40. //加载失败
  41. - (void)showBlankLoadFailure:(nullable void (^)(void))action offsetY:(CGFloat)offsetY;
  42. - (void)showBlankLoadFailure:(nullable void (^)(void))action;
  43. @end