UIView+PlaceHolder.h 863 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // UIView+PlaceHolder.h
  3. // Template
  4. //
  5. // Created by LStar on 2019/3/18.
  6. // Copyright © 2019 Future. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface PlaceHolderView : UIView
  10. @property (nonatomic, strong, readonly) UIImageView *imageView;
  11. @property (nonatomic, strong, readonly) UILabel *titleLabel;
  12. @property (nonatomic, strong, readonly) UIButton *button;
  13. - (void)setTopSpacing:(CGFloat)spacing;
  14. @end
  15. @interface UIView (PlaceHolder)
  16. @property(nonatomic,strong)PlaceHolderView *placeHolderView;
  17. - (void)hidePlaceHolder;
  18. - (void)showHint:(NSString *)hint;
  19. - (void)showNoData;
  20. - (void)showHint:(NSString *)hint andPlaceHolderImage:(UIImage *)holderImage;
  21. - (void)showHint:(NSString *)hint andPlaceHolderImage:(UIImage *)holderImage refreshButtonText:(NSString *)buttonText refreshAction:(void(^)(void))refreshAction;
  22. @end