diff --git a/src/Components/MRProgressOverlayView.m b/src/Components/MRProgressOverlayView.m index d20b482..951410f 100644 --- a/src/Components/MRProgressOverlayView.m +++ b/src/Components/MRProgressOverlayView.m @@ -337,8 +337,15 @@ - (UIView *)createModeView { } - (void)setModeView:(UIView *)modeView { + if (_modeView) { + [_modeView removeFromSuperview]; + } + _modeView = modeView; - [self.dialogView addSubview:modeView]; + + if (_modeView) { + [self.dialogView addSubview:_modeView]; + } } - (UIView *)createViewForMode:(MRProgressOverlayViewMode)mode {