diff --git a/src/Components/MRProgressOverlayView.h b/src/Components/MRProgressOverlayView.h index 578dc3d..0a2ce5c 100644 --- a/src/Components/MRProgressOverlayView.h +++ b/src/Components/MRProgressOverlayView.h @@ -191,6 +191,12 @@ typedef NS_ENUM(NSUInteger, MRProgressOverlayViewMode){ */ @property (nonatomic, copy) MRProgressOverlayViewStopBlock stopBlock; +/** Setting this value to YES will prevent backgroundColor change when displaying the Overlay */ +@property (nonatomic, assign) BOOL shouldHideBackgroundMask; + +/** Background Color Opacity */ +@property (nonatomic, assign) float backgroundMaskOpacity; + /** Change the tint color of the mode views. diff --git a/src/Components/MRProgressOverlayView.m b/src/Components/MRProgressOverlayView.m index d20b482..9d134ba 100644 --- a/src/Components/MRProgressOverlayView.m +++ b/src/Components/MRProgressOverlayView.m @@ -180,6 +180,9 @@ - (void)commonInit { // Create blurView self.blurView = [self createBlurView]; + self.shouldHideBackgroundMask = NO; + self.backgroundMaskOpacity = 0.4f; + // Create container with contents UIView *dialogView = [UIView new]; [self addSubview:dialogView]; @@ -566,7 +569,9 @@ - (void)show:(BOOL)animated { void(^animBlock)() = ^{ [self setSubviewTransform:CGAffineTransformIdentity alpha:1.0f]; - self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4f]; + if (!self.shouldHideBackgroundMask) { + self.backgroundColor = [UIColor colorWithWhite:0 alpha:self.backgroundMaskOpacity]; + } }; if (animated) {