added var to determine fillContainer

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-01-30 11:31:18 -06:00
parent 7469a5249f
commit d56f34258d

View File

@ -11,7 +11,9 @@ import MVMCore
import VDSColorTokens
open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol, TabsDelegate, MVMCorePresentationDelegateProtocol, SubNavSwipeNavigationProtocol {
/// The number of tabs count or less that will turn on the fillContainer
public var fillContainerTabsCount = 2 { didSet { tabs.fillContainer = tabsModel.tabs.count <= fillContainerTabsCount }}
/// The current managed view controller
private var viewController: UIViewController
@ -31,7 +33,6 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
public lazy var tabs: Tabs = {
let tabs = Tabs(model: tabsModel, delegateObjectIVar, nil)
tabs.backgroundColor = (viewController as? PageProtocol)?.pageModel?.navigationBar?.backgroundColor?.uiColor ?? VDSColor.backgroundPrimaryLight
tabs.fillContainer = true
tabs.delegate = self
return tabs
}()
@ -71,6 +72,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
func setup(with loadObject: MVMCoreLoadObject, shouldEnableSwipeGestures: Bool) {
self.loadObject = loadObject
pageType = loadObject.pageType
tabs.fillContainer = tabsModel.tabs.count <= fillContainerTabsCount
if shouldEnableSwipeGestures {
customInteractor = SubNavInteractor(viewController: self)
}