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 bottomContentView = View()
let bottomLine = Line()
let selectionLine = View()
var selectionLineLeftConstraint: NSLayoutConstraint?
var selectionLineWidthConstraint: NSLayoutConstraint?
@ -67,6 +68,8 @@ import VDSColorTokens
open override func setupView() {
super.setupView()
backgroundColor = VDSColor.backgroundPrimaryLight
bottomLine.setStyle(.secondary)
addSubview(bottomLine)
setupCollectionView()
setupSelectionLine()
setupConstraints()
@ -114,6 +117,10 @@ import VDSColorTokens
selectionLineWidthConstraint = selectionLine.widthAnchor.constraint(equalToConstant: minimumItemWidth)
selectionLineWidthConstraint?.isActive = true
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.translatesAutoresizingMaskIntoConstraints = false
tabs.delegate = self
tabs.bottomLine.setStyle(.secondary)
contentView.addSubview(tabs)
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.
public lazy var stackView: UIStackView = {
let stackView = UIStackView(arrangedSubviews: [tabs, line, subNavigationController.view])
let stackView = UIStackView(arrangedSubviews: [tabs, subNavigationController.view])
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.isAccessibilityElement = false
stackView.axis = .vertical
@ -33,10 +33,6 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
return tabs
}()
public lazy var line: Line = {
return Line(model: LineModel(type: .secondary), delegateObjectIVar, nil)
}()
public lazy var subNavigationController: UINavigationController = {
let subNavigationController = SubNavManagerNavigationController(rootViewController: viewController)
subNavigationController.view.translatesAutoresizingMaskIntoConstraints = false