HWDimmedView.h 703 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // HWDimmedView.h
  3. // HWPanModal
  4. //
  5. // Created by heath wang on 2019/4/26.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. typedef NS_ENUM(NSInteger, DimState) {
  10. DimStateMax,
  11. DimStateOff,
  12. DimStatePercent,
  13. };
  14. typedef void(^didTap)(UITapGestureRecognizer *recognizer);
  15. @interface HWDimmedView : UIView
  16. @property (nonatomic, assign) DimState dimState;
  17. @property (nonatomic, assign) CGFloat percent;
  18. @property (nullable, nonatomic, copy) didTap tapBlock;
  19. @property (nullable, nonatomic, strong) UIColor *blurTintColor;
  20. /**
  21. * init with the max dim alpha & max blur radius.
  22. */
  23. - (instancetype)initWithDimAlpha:(CGFloat)dimAlpha blurRadius:(CGFloat)blurRadius;
  24. @end
  25. NS_ASSUME_NONNULL_END