fixed other bugs for tab
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
90ac92144f
commit
ee48532cce
@ -97,7 +97,7 @@ extension Tabs {
|
||||
|
||||
private func updateWidth() {
|
||||
labelWidthConstraint?.isActive = false
|
||||
guard let width else { return }
|
||||
guard let width, width > minWidth else { return }
|
||||
labelWidthConstraint?.constant = width
|
||||
labelWidthConstraint?.isActive = true
|
||||
}
|
||||
@ -138,7 +138,8 @@ extension Tabs {
|
||||
label.pinTrailing(layoutGuide.trailingAnchor)
|
||||
|
||||
//setup constraints
|
||||
labelWidthConstraint = label.width(constant: 0).with { $0.isActive = false }
|
||||
labelWidthConstraint = layoutGuide.width(constant: 0).with { $0.isActive = false }
|
||||
layoutGuide.widthGreaterThanEqualTo(minWidth)
|
||||
labelTopConstraint = label.pinTop(anchor: layoutGuide.topAnchor)
|
||||
labelLeadingConstraint = label.pinLeading(anchor: layoutGuide.leadingAnchor)
|
||||
labelBottomConstraint = label.pinBottom(anchor: layoutGuide.bottomAnchor, priority: .defaultHigh)
|
||||
@ -164,7 +165,6 @@ extension Tabs {
|
||||
label.textStyle = textStyle
|
||||
label.textPosition = textPosition
|
||||
label.textColorConfiguration = textColorConfiguration.eraseToAnyColorable()
|
||||
|
||||
setNeedsLayout()
|
||||
layoutIfNeeded()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user