Merge branch 'feature/system_nav_back' into 'develop'
Feature/system nav back See merge request BPHV_MIPS/mvm_core_ui!763
This commit is contained in:
commit
dbeab9ef6b
@ -3204,6 +3204,7 @@
|
|||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
|
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -3230,6 +3231,7 @@
|
|||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
|
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCoreUI;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
|||||||
@ -51,6 +51,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
case backgroundColor
|
case backgroundColor
|
||||||
case tintColor
|
case tintColor
|
||||||
case line
|
case line
|
||||||
|
case hidesSystemBackButton
|
||||||
case alwaysShowBackButton
|
case alwaysShowBackButton
|
||||||
case backButton
|
case backButton
|
||||||
case additionalLeftButtons
|
case additionalLeftButtons
|
||||||
@ -69,6 +70,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) ?? Color(uiColor: .mvmWhite)
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) ?? Color(uiColor: .mvmWhite)
|
||||||
tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor) ?? Color(uiColor: .mvmBlack)
|
tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor) ?? Color(uiColor: .mvmBlack)
|
||||||
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) ?? LineModel(type: .standard)
|
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)
|
alwaysShowBackButton = try typeContainer.decodeIfPresent(Bool.self, forKey: .alwaysShowBackButton)
|
||||||
backButton = try typeContainer.decodeModelIfPresent(codingKey: .backButton)
|
backButton = try typeContainer.decodeModelIfPresent(codingKey: .backButton)
|
||||||
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
|
additionalLeftButtons = try typeContainer.decodeModelsIfPresent(codingKey: .additionalLeftButtons)
|
||||||
@ -84,6 +86,7 @@ open class NavigationItemModel: NavigationItemModelProtocol, MoleculeModelProtoc
|
|||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
try container.encode(tintColor, forKey: .tintColor)
|
try container.encode(tintColor, forKey: .tintColor)
|
||||||
try container.encodeIfPresent(line, forKey: .line)
|
try container.encodeIfPresent(line, forKey: .line)
|
||||||
|
try container.encode(hidesSystemBackButton, forKey: .hidesSystemBackButton)
|
||||||
try container.encodeIfPresent(alwaysShowBackButton, forKey: .alwaysShowBackButton)
|
try container.encodeIfPresent(alwaysShowBackButton, forKey: .alwaysShowBackButton)
|
||||||
try container.encodeModelIfPresent(backButton, forKey: .backButton)
|
try container.encodeModelIfPresent(backButton, forKey: .backButton)
|
||||||
try container.encodeModelsIfPresent(additionalLeftButtons, forKey: .additionalLeftButtons)
|
try container.encodeModelsIfPresent(additionalLeftButtons, forKey: .additionalLeftButtons)
|
||||||
|
|||||||
@ -59,7 +59,8 @@ import UIKit
|
|||||||
public static func setNavigationButtons(navigationController: UINavigationController, navigationItemModel: NavigationItemModelProtocol, viewController: UIViewController) {
|
public static func setNavigationButtons(navigationController: UINavigationController, navigationItemModel: NavigationItemModelProtocol, viewController: UIViewController) {
|
||||||
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
|
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
|
||||||
var leftItems: [UIBarButtonItem] = []
|
var leftItems: [UIBarButtonItem] = []
|
||||||
if navigationItemModel.alwaysShowBackButton != false {
|
if navigationItemModel.hidesSystemBackButton,
|
||||||
|
navigationItemModel.alwaysShowBackButton != false {
|
||||||
if let backButtonModel = navigationItemModel.backButton,
|
if let backButtonModel = navigationItemModel.backButton,
|
||||||
MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1 || navigationItemModel.alwaysShowBackButton ?? false {
|
MVMCoreNavigationHandler.shared()?.getViewControllers(for: navigationController)?.count ?? 0 > 1 || navigationItemModel.alwaysShowBackButton ?? false {
|
||||||
leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
|
leftItems.append(backButtonModel.createNavigationItemButton(delegateObject: delegate, additionalData: nil))
|
||||||
|
|||||||
@ -41,6 +41,7 @@ public extension MVMCoreUISplitViewController {
|
|||||||
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
|
let delegate = (viewController as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
|
||||||
|
|
||||||
// Add back button first.
|
// Add back button first.
|
||||||
|
if navigationItemModel?.hidesSystemBackButton == true {
|
||||||
var showBackButton: Bool
|
var showBackButton: Bool
|
||||||
if let forceBackButton = navigationItemModel?.alwaysShowBackButton {
|
if let forceBackButton = navigationItemModel?.alwaysShowBackButton {
|
||||||
showBackButton = forceBackButton
|
showBackButton = forceBackButton
|
||||||
@ -55,6 +56,7 @@ public extension MVMCoreUISplitViewController {
|
|||||||
leftItems.append(backButton)
|
leftItems.append(backButton)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add the panel button after the back button.
|
// Add the panel button after the back button.
|
||||||
if let panelButton = leftPanelButton,
|
if let panelButton = leftPanelButton,
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user