HomeViewController: Show the activity indicator on the right child vc

This commit is contained in:
manuroe
2016-04-19 17:15:24 +02:00
parent 4f183fe2b3
commit 9657c36da2
+9 -4
View File
@@ -369,14 +369,19 @@
- (void)startActivityIndicator
{
// Redirect the operation to the main displayed VC
[recentsViewController startActivityIndicator];
// Redirect the operation to the currently displayed VC
// It is a MXKViewController or a MXKTableViewController. So it supports startActivityIndicator
[self.selectedViewController performSelector:@selector(startActivityIndicator)];
}
- (void)stopActivityIndicator
{
// Redirect the operation to the main displayed VC
[recentsViewController stopActivityIndicator];
// The selected view controller mwy have changed since the call of [self startActivityIndicator]
// So, stop the activity indicator for all children
for (UIViewController *viewController in self.viewControllers)
{
[viewController performSelector:@selector(stopActivityIndicator)];
}
}
#pragma mark - Override UIViewController+VectorSearch