From 9be7fef53c2ae991c19bba1d8e97caf127e25182 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Tue, 31 Oct 2023 22:51:39 +0530 Subject: [PATCH] Showing/Hiding the text while starting/pausing the loading overlay --- MVMCoreUI/BaseControllers/MFLoadingViewController.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MVMCoreUI/BaseControllers/MFLoadingViewController.m b/MVMCoreUI/BaseControllers/MFLoadingViewController.m index fb7dd8f8..79565df2 100644 --- a/MVMCoreUI/BaseControllers/MFLoadingViewController.m +++ b/MVMCoreUI/BaseControllers/MFLoadingViewController.m @@ -45,6 +45,7 @@ Label *infoLabel = [Label label]; infoLabel.textAlignment = NSTextAlignmentCenter; infoLabel.translatesAutoresizingMaskIntoConstraints = NO; + infoLabel.hidden = true; self.indicatorText = infoLabel; [loadingStack addArrangedSubview:infoLabel]; @@ -84,15 +85,20 @@ if(text != nil){ self.indicatorText.attributedText = text; self.indicatorText.accessibilityLabel = text.string; + self.indicatorText.hidden = false; } else { self.indicatorText.attributedText = nil; self.indicatorText.accessibilityLabel = @""; + self.indicatorText.hidden = true; } [self.activityIndicator resumeSpinner]; } - (void)stopLoading { [self.activityIndicator pauseSpinner]; + self.indicatorText.hidden = true; + self.indicatorText.attributedText = nil; + self.indicatorText.accessibilityLabel = @""; } @end