Merge branch 'bugfix/CXTDT-221702_change' into 'develop'
formatting, remove manager stuff See merge request BPHV_MIPS/mvm_core!178
This commit is contained in:
commit
22d2d73b50
@ -842,6 +842,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Presentation Delegate
|
#pragma mark - Presentation Delegate
|
||||||
|
- (void)navigationController:(UINavigationController *)navigationController prepareDisplayForViewController:(UIViewController *)viewController {
|
||||||
|
if ([self.delegateObject.presentationDelegate respondsToSelector:@selector(navigationController:prepareDisplayForViewController:)]) {
|
||||||
|
[self.delegateObject.presentationDelegate navigationController:navigationController prepareDisplayForViewController:viewController];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)navigationController:(UINavigationController *)navigationController willDisplayViewController:(UIViewController *)viewController {
|
- (void)navigationController:(UINavigationController *)navigationController willDisplayViewController:(UIViewController *)viewController {
|
||||||
|
|
||||||
|
|||||||
@ -213,12 +213,14 @@
|
|||||||
- (void)pushViewController {
|
- (void)pushViewController {
|
||||||
// Although the post animation state is currently fine with push, store anyway as a precaution
|
// 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.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];
|
[self.navigationObject.navigationController pushViewController:self.navigationObject.viewController animated:self.navigationObject.animated];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setViewControllers:(NSArray *)viewControllers {
|
- (void)setViewControllers:(NSArray *)viewControllers {
|
||||||
self.futureViewControllers = viewControllers;
|
self.futureViewControllers = viewControllers;
|
||||||
if (![self.navigationObject.navigationController.viewControllers isEqualToArray: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];
|
[self.navigationObject.navigationController setViewControllers:viewControllers animated:self.navigationObject.animated];
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -227,6 +229,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify delegates to prepare for the controller to be added to the navigation controller.
|
||||||
|
- (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 {
|
- (void)markAsFinished {
|
||||||
self.navigationObject.navigationController.delegate = nil;
|
self.navigationObject.navigationController.delegate = nil;
|
||||||
if (self.navigationObject.stopLoadingOverlay) {
|
if (self.navigationObject.stopLoadingOverlay) {
|
||||||
@ -241,7 +259,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Delegate
|
#pragma mark - Delegate
|
||||||
|
|
||||||
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
||||||
if (self.navigationObject.stopLoadingOverlay) {
|
if (self.navigationObject.stopLoadingOverlay) {
|
||||||
[[MVMCoreLoadingOverlayHandler sharedLoadingOverlay] stopLoading:YES];
|
[[MVMCoreLoadingOverlayHandler sharedLoadingOverlay] stopLoading:YES];
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
@protocol MVMCorePresentationDelegateProtocol
|
@protocol MVMCorePresentationDelegateProtocol
|
||||||
|
|
||||||
@optional
|
@optional
|
||||||
|
// Called when a view controller is about to be added to a navigation controller
|
||||||
|
- (void)navigationController:(nonnull UINavigationController *)navigationController prepareDisplayForViewController:(nonnull UIViewController *)viewController;
|
||||||
|
|
||||||
// Called when a view controller will be displayed on a navigation controller
|
// Called when a view controller will be displayed on a navigation controller
|
||||||
- (void)navigationController:(nonnull UINavigationController *)navigationController willDisplayViewController:(nonnull UIViewController *)viewController;
|
- (void)navigationController:(nonnull UINavigationController *)navigationController willDisplayViewController:(nonnull UIViewController *)viewController;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user