diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj
index ab5f9887..1d2c67eb 100644
--- a/MVMCoreUI.xcodeproj/project.pbxproj
+++ b/MVMCoreUI.xcodeproj/project.pbxproj
@@ -3204,6 +3204,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
@@ -3230,6 +3231,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
diff --git a/MVMCoreUI/Atomic/Molecules/NavigationBar/NavigationItemModel.swift b/MVMCoreUI/Atomic/Molecules/NavigationBar/NavigationItemModel.swift
index 6a75718b..d8126508 100644
--- a/MVMCoreUI/Atomic/Molecules/NavigationBar/NavigationItemModel.swift
+++ b/MVMCoreUI/Atomic/Molecules/NavigationBar/NavigationItemModel.swift
@@ -51,6 +51,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
case backgroundColor
case tintColor
case line
+ case hidesSystemBackButton
case alwaysShowBackButton
case backButton
case additionalLeftButtons
@@ -69,6 +70,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) ?? Color(uiColor: .mvmWhite)
tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor) ?? Color(uiColor: .mvmBlack)
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) ?? LineModel(type: .standard)
+ hidesSystemBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .hidesSystemBackButton) ?? true
alwaysShowBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowBackButton)
backButton = try typeContainer.decodeModelIfPresent(codingKey: .backButton)
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
@@ -84,6 +86,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
try container.encode(tintColor, forKey: .tintColor)
try container.encodeIfPresent(line, forKey: .line)
+ try container.encode(hidesSystemBackButton, forKey: .hidesSystemBackButton)
try container.encodeIfPresent(alwaysShowBackButton, forKey: .alwaysShowBackButton)
try container.encodeModelIfPresent(backButton, forKey: .backButton)
try container.encodeModelsIfPresent(additionalLeftButtons, forKey: .additionalLeftButtons)
diff --git a/MVMCoreUI/Containers/NavigationController.swift b/MVMCoreUI/Containers/NavigationController.swift
index 22e7ee6b..e74671ad 100644
--- a/MVMCoreUI/Containers/NavigationController.swift
+++ b/MVMCoreUI/Containers/NavigationController.swift
@@ -59,7 +59,8 @@ import UIKit
public static func setNavigationButtons(navigationController: UINavigationController, navigationItemModel: NavigationItemModelProtocol, viewController: UIViewController) {
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
var leftItems: [UIBarButtonItem] = []
- if navigationItemModel.alwaysShowBackButton != false {
+ if navigationItemModel.hidesSystemBackButton,
+ navigationItemModel.alwaysShowBackButton != false {
if let backButtonModel = navigationItemModel.backButton,
MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1 || navigationItemModel.alwaysShowBackButton ?? false {
leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController+Extension.swift b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController+Extension.swift
index e08d11dd..98a4c078 100644
--- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController+Extension.swift
+++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController+Extension.swift
@@ -41,18 +41,20 @@ public extension MVMCoreUISplitViewController {
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
// Add back button first.
- var showBackButton: Bool
- if let forceBackButton = navigationItemModel?.alwaysShowBackButton {
- showBackButton = forceBackButton
- } else {
- showBackButton = MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1
- }
- if showBackButton {
- if let backButtonModel = navigationItemModel?.backButton {
- leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
- } else if let backButton = backButton {
- // Default to legacy if we have default back button.
- leftItems.append(backButton)
+ if navigationItemModel?.hidesSystemBackButton == true {
+ var showBackButton: Bool
+ if let forceBackButton = navigationItemModel?.alwaysShowBackButton {
+ showBackButton = forceBackButton
+ } else {
+ showBackButton = MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1
+ }
+ if showBackButton {
+ if let backButtonModel = navigationItemModel?.backButton {
+ leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
+ } else if let backButton = backButton {
+ // Default to legacy if we have default back button.
+ leftItems.append(backButton)
+ }
}
}
diff --git a/MVMCoreUI/Info.plist b/MVMCoreUI/Info.plist
index e1fe4cfb..82790df0 100644
--- a/MVMCoreUI/Info.plist
+++ b/MVMCoreUI/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.0
+ $(MARKETING_VERSION)
CFBundleVersion
$(CURRENT_PROJECT_VERSION)