mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Add new loading indicators
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
if ([self providesCustomActivityIndicator]) {
|
||||
// If a subclass provides custom activity indicator, the default one will not even be initialized.
|
||||
return;
|
||||
}
|
||||
|
||||
// Add default activity indicator
|
||||
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
|
||||
activityIndicator.backgroundColor = [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1.0];
|
||||
@@ -56,9 +61,13 @@
|
||||
|
||||
#pragma mark - Activity indicator
|
||||
|
||||
- (BOOL)providesCustomActivityIndicator {
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)startActivityIndicator
|
||||
{
|
||||
if (activityIndicator)
|
||||
if (activityIndicator && ![self providesCustomActivityIndicator])
|
||||
{
|
||||
[self.view bringSubviewToFront:activityIndicator];
|
||||
[activityIndicator startAnimating];
|
||||
@@ -79,5 +88,4 @@
|
||||
[activityIndicator stopAnimating];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user