Adding option to show a label to loading overlay
This commit is contained in:
parent
20d6149918
commit
3d4f8938dc
@ -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 NSString *) text;
|
||||
|
||||
// Returns if it is showing.
|
||||
- (BOOL)isShowing;
|
||||
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
#pragma mark - Overlay Functions
|
||||
|
||||
- (void)startLoading {
|
||||
[self startLoadingWith:nil];
|
||||
}
|
||||
|
||||
- (void)startLoadingWith:(nullable NSString *)text {
|
||||
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
|
||||
@ -72,7 +76,7 @@
|
||||
}
|
||||
|
||||
// Restarts the loading animation.
|
||||
[self.loadingViewController startLoading];
|
||||
[self.loadingViewController startLoadingWith:text];
|
||||
|
||||
if (self.animatingOut) {
|
||||
|
||||
|
||||
@ -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 NSString *) text;
|
||||
|
||||
@end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user