Added view controller getter.
This commit is contained in:
parent
e60824ee1b
commit
43bd436225
@ -59,7 +59,7 @@ import UIKit
|
||||
var leftItems: [UIBarButtonItem] = []
|
||||
if navigationItemModel.alwaysShowBackButton != false {
|
||||
if let backButtonModel = navigationItemModel.backButton,
|
||||
navigationController.viewControllers.count > 1 || navigationItemModel.alwaysShowBackButton ?? false {
|
||||
MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1 || navigationItemModel.alwaysShowBackButton ?? false {
|
||||
leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
|
||||
}
|
||||
if let leftItemModels = navigationItemModel.additionalLeftButtons {
|
||||
|
||||
@ -48,7 +48,7 @@ public extension MVMCoreUISplitViewController {
|
||||
if let forceBackButton = navigationItemModel?.alwaysShowBackButton {
|
||||
showBackButton = forceBackButton
|
||||
} else {
|
||||
showBackButton = navigationController.viewControllers.count > 1
|
||||
showBackButton = MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1
|
||||
}
|
||||
if showBackButton {
|
||||
if let backButtonModel = navigationItemModel?.backButton {
|
||||
|
||||
@ -241,7 +241,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
|
||||
- (void)setLeftNavigationItemForViewController:(UIViewController * _Nonnull)viewController accessible:(BOOL)accessible extended:(BOOL)extended {
|
||||
NSMutableArray *leftBarButtonItems = [NSMutableArray array];
|
||||
if ([viewController.navigationController.viewControllers count] > 1) {
|
||||
if (viewController.navigationController && [MVMCoreNavigationHandler.sharedNavigationHandler getViewControllersForNavigationController:viewController.navigationController].count > 1) {
|
||||
[leftBarButtonItems addObject:self.backButton];
|
||||
}
|
||||
if ((accessible && !extended) && self.leftPanelButton) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user