HWBackgroundConfig.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // HWBackgroundConfig.h
  3. // Pods
  4. //
  5. // Created by heath wang on 2020/4/17.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. typedef NS_ENUM(NSUInteger, HWBackgroundBehavior) {
  10. HWBackgroundBehaviorDefault, // use background alpha
  11. HWBackgroundBehaviorSystemVisualEffect, // use system UIVisualEffect object
  12. HWBackgroundBehaviorCustomBlurEffect, // use custom blur
  13. };
  14. @interface HWBackgroundConfig : NSObject
  15. @property (nonatomic, assign) HWBackgroundBehavior backgroundBehavior;
  16. // ONLY works for backgroundBehavior = HWBackgroundBehaviorDefault
  17. @property (nonatomic, assign) CGFloat backgroundAlpha; // default is 0.7
  18. // ONLY works for backgroundBehavior = HWBackgroundBehaviorSystemVisualEffect
  19. @property (nonatomic, strong) UIVisualEffect *visualEffect; // default is UIBlurEffectStyleLight
  20. // ONLY works for backgroundBehavior = HWBackgroundBehaviorCustomBlurEffect
  21. @property (nonatomic, strong) UIColor *blurTintColor; // default is white color
  22. @property (nonatomic, assign) CGFloat backgroundBlurRadius; // default is 10
  23. - (instancetype)initWithBehavior:(HWBackgroundBehavior)backgroundBehavior;
  24. + (instancetype)configWithBehavior:(HWBackgroundBehavior)backgroundBehavior;
  25. @end
  26. NS_ASSUME_NONNULL_END