implemented delegate callbacks for prepareForDisplay
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b907943bb1
commit
7bc26a8e46
@ -213,12 +213,14 @@
|
||||
- (void)pushViewController {
|
||||
// Although the post animation state is currently fine with push, store anyway as a precaution
|
||||
self.futureViewControllers = [self.navigationObject.navigationController.viewControllers arrayByAddingObject:self.navigationObject.viewController];
|
||||
[self navigationController:self.navigationObject.navigationController prepareDisplayForViewController:self.navigationObject.viewController];
|
||||
[self.navigationObject.navigationController pushViewController:self.navigationObject.viewController animated:self.navigationObject.animated];
|
||||
}
|
||||
|
||||
- (void)setViewControllers:(NSArray *)viewControllers {
|
||||
self.futureViewControllers = viewControllers;
|
||||
if (![self.navigationObject.navigationController.viewControllers isEqualToArray:viewControllers]) {
|
||||
[self navigationController:self.navigationObject.navigationController prepareDisplayForViewController:viewControllers.lastObject];
|
||||
[self.navigationObject.navigationController setViewControllers:viewControllers animated:self.navigationObject.animated];
|
||||
} else {
|
||||
|
||||
@ -227,6 +229,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) navigationController:(UINavigationController *)navigationController prepareDisplayForViewController:(UIViewController *)viewController{
|
||||
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(navigationController:prepareDisplayForViewController:)]) {
|
||||
[self.delegate navigationController:navigationController
|
||||
prepareDisplayForViewController:viewController];
|
||||
}
|
||||
|
||||
for (NSObject<MVMCorePresentationDelegateProtocol> *delegate in [MVMCoreNavigationHandler sharedNavigationHandler].delegates.allObjects) {
|
||||
if (delegate && [delegate respondsToSelector:@selector(navigationController:prepareDisplayForViewController:)]) {
|
||||
[delegate navigationController:navigationController
|
||||
prepareDisplayForViewController:viewController];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)markAsFinished {
|
||||
self.navigationObject.navigationController.delegate = nil;
|
||||
if (self.navigationObject.stopLoadingOverlay) {
|
||||
@ -241,7 +258,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - Delegate
|
||||
|
||||
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
||||
if (self.navigationObject.stopLoadingOverlay) {
|
||||
[[MVMCoreLoadingOverlayHandler sharedLoadingOverlay] stopLoading:YES];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user