Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Components/MRProgressOverlayView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 6 additions & 1 deletion src/Components/MRProgressOverlayView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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) {
Expand Down