RAPopviewContainer.h 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // KKPopupViewWrapper.h
  3. // KKTV
  4. //
  5. // Created by yangyi on 2018/7/6.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @protocol RAPopviewProtocol <NSObject>
  10. - (UIView *)show:(UIView *)parentView;
  11. - (void)hide;
  12. @end
  13. // 给弹出视图加一个可点击的背景,点击背景视图隐藏
  14. @interface RAPopviewContainer : UIButton <RAPopviewProtocol>
  15. - (instancetype)initWithView:(id<RAPopviewProtocol>)popupView;
  16. @property (nonatomic, strong) UIColor * _Nullable bgColor;//默认为nil,表示背景透明
  17. @property (nonatomic, copy) void (^ _Nullable hideHandler) (void);//背景及视图消失回调
  18. @property bool modalView;
  19. @end
  20. // 弹出视图需继承自该类
  21. @interface RAPopView : UIView <RAPopviewProtocol>
  22. @end
  23. //@interface KKPopupObject : NSObject <RAPopviewProtocol>
  24. //
  25. //- (void)hide NS_REQUIRES_SUPER;
  26. //
  27. //@end
  28. NS_ASSUME_NONNULL_END