Reverting - line changes in Tab component & Removing line item in Subnavigation controller

This commit is contained in:
Sumanth Nadigadda 2022-05-27 12:13:06 +05:30
parent 19ef7a3a26
commit eeb6573e72
3 changed files with 9 additions and 5 deletions

View File

@ -28,6 +28,7 @@ import VDSColorTokens
let bottomScrollView = UIScrollView(frame: .zero) let bottomScrollView = UIScrollView(frame: .zero)
let bottomContentView = View() let bottomContentView = View()
let bottomLine = Line()
let selectionLine = View() let selectionLine = View()
var selectionLineLeftConstraint: NSLayoutConstraint? var selectionLineLeftConstraint: NSLayoutConstraint?
var selectionLineWidthConstraint: NSLayoutConstraint? var selectionLineWidthConstraint: NSLayoutConstraint?
@ -67,6 +68,8 @@ import VDSColorTokens
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
backgroundColor = VDSColor.backgroundPrimaryLight backgroundColor = VDSColor.backgroundPrimaryLight
bottomLine.setStyle(.secondary)
addSubview(bottomLine)
setupCollectionView() setupCollectionView()
setupSelectionLine() setupSelectionLine()
setupConstraints() setupConstraints()
@ -114,6 +117,10 @@ import VDSColorTokens
selectionLineWidthConstraint = selectionLine.widthAnchor.constraint(equalToConstant: minimumItemWidth) selectionLineWidthConstraint = selectionLine.widthAnchor.constraint(equalToConstant: minimumItemWidth)
selectionLineWidthConstraint?.isActive = true selectionLineWidthConstraint?.isActive = true
NSLayoutConstraint.constraintPinSubview(toSuperview: bottomContentView) NSLayoutConstraint.constraintPinSubview(toSuperview: bottomContentView)
//bottom line
bottomLine.topAnchor.constraint(equalTo: bottomScrollView.bottomAnchor).isActive = true;
NSLayoutConstraint.constraintPinSubview(bottomLine, pinTop: false, pinBottom: true, pinLeft: true, pinRight: true)
} }
//------------------------------------------------- //-------------------------------------------------

View File

@ -22,6 +22,7 @@ import UIKit
tabs.paddingBeforeFirstTab = false tabs.paddingBeforeFirstTab = false
tabs.translatesAutoresizingMaskIntoConstraints = false tabs.translatesAutoresizingMaskIntoConstraints = false
tabs.delegate = self tabs.delegate = self
tabs.bottomLine.setStyle(.secondary)
contentView.addSubview(tabs) contentView.addSubview(tabs)
NSLayoutConstraint.activate(Array(NSLayoutConstraint.pinView(toSuperview: tabs, useMargins: true).values)) NSLayoutConstraint.activate(Array(NSLayoutConstraint.pinView(toSuperview: tabs, useMargins: true).values))

View File

@ -19,7 +19,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
/// Used to layout the ui. /// Used to layout the ui.
public lazy var stackView: UIStackView = { public lazy var stackView: UIStackView = {
let stackView = UIStackView(arrangedSubviews: [tabs, line, subNavigationController.view]) let stackView = UIStackView(arrangedSubviews: [tabs, subNavigationController.view])
stackView.translatesAutoresizingMaskIntoConstraints = false stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.isAccessibilityElement = false stackView.isAccessibilityElement = false
stackView.axis = .vertical stackView.axis = .vertical
@ -33,10 +33,6 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
return tabs return tabs
}() }()
public lazy var line: Line = {
return Line(model: LineModel(type: .secondary), delegateObjectIVar, nil)
}()
public lazy var subNavigationController: UINavigationController = { public lazy var subNavigationController: UINavigationController = {
let subNavigationController = SubNavManagerNavigationController(rootViewController: viewController) let subNavigationController = SubNavManagerNavigationController(rootViewController: viewController)
subNavigationController.view.translatesAutoresizingMaskIntoConstraints = false subNavigationController.view.translatesAutoresizingMaskIntoConstraints = false