diff --git a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.h b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.h index 64e5388..666f1b3 100644 --- a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.h +++ b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.h @@ -17,6 +17,9 @@ // Starts Loading. Every start loading call must be terminated with an end loading call. - (void)startLoading; +// Starts Loading, by showing the text in the center +- (void)startLoadingWith:(nullable NSAttributedString *) text; + // Returns if it is showing. - (BOOL)isShowing; diff --git a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.m b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.m index bc49369..e53df5e 100644 --- a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.m +++ b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingOverlayHandler.m @@ -52,6 +52,10 @@ #pragma mark - Overlay Functions - (void)startLoading { + [self startLoadingWith:nil]; +} + +- (void)startLoadingWith:(nullable NSAttributedString *)text { [MVMCoreDispatchUtility performBlockOnMainThread:^{ @@ -73,7 +77,7 @@ } // Restarts the loading animation. - [self.loadingViewController startLoading]; + [self.loadingViewController startLoadingWith:text]; if (self.animatingOut) { diff --git a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingViewControllerProtocol.h b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingViewControllerProtocol.h index 9a880d7..e4afe13 100644 --- a/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingViewControllerProtocol.h +++ b/MVMCore/MVMCore/LoadHandling/LoadingOverlay/MVMCoreLoadingViewControllerProtocol.h @@ -14,4 +14,8 @@ // Called when the view controller should stop animating loading. - (void)stopLoading; +@optional +// Called when the view controller should animate loading with custom text +- (void)startLoadingWith:(nullable NSAttributedString *) text; + @end