revert max header width until wee can properly do it

This commit is contained in:
Pfeil, Scott Robert 2021-05-21 09:22:17 -04:00
parent acb18d12b8
commit 06407930ab
2 changed files with 0 additions and 16 deletions

View File

@ -22,12 +22,6 @@ open class HeaderView: Container {
addSubview(molecule)
containerHelper.constrainView(molecule)
self.molecule = molecule
guard let margins = molecule.superview?.layoutMarginsGuide else { return }
containerHelper.rightConstraint?.isActive = false
containerHelper.rightConstraint = margins.rightAnchor.constraint(equalTo: molecule.rightAnchor)
containerHelper.rightConstraint?.priority = UILayoutPriority(rawValue: 999)
containerHelper.rightConstraint?.isActive = true
molecule.widthAnchor.constraint(equalToConstant: HeaderMaxWidth).isActive = true
}
// MARK: - MVMCoreViewProtocol

View File

@ -24,16 +24,6 @@ public class MoleculeHeaderView: MoleculeContainer {
// MARK: - MVMCoreViewProtocol
//--------------------------------------------------
public override func addMolecule(_ molecule: UIView) {
super.addMolecule(molecule)
guard let margins = molecule.superview?.layoutMarginsGuide else { return }
containerHelper.rightConstraint?.isActive = false
containerHelper.rightConstraint = margins.rightAnchor.constraint(equalTo: molecule.rightAnchor)
containerHelper.rightConstraint?.priority = UILayoutPriority(rawValue: 999)
containerHelper.rightConstraint?.isActive = true
molecule.widthAnchor.constraint(lessThanOrEqualToConstant: HeaderMaxWidth).isActive = true
}
open override func updateView(_ size: CGFloat) {
super.updateView(size)
line.updateView(size)