fixed orientation bug

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-05-25 10:25:21 -05:00
parent 62ffdebbfc
commit a872cf801c

View File

@ -52,12 +52,7 @@ open class Tabs: View {
}
}
}
public enum Width {
case percentage(CGFloat)
case value(CGFloat)
}
//--------------------------------------------------
// MARK: - Public Properties
//--------------------------------------------------
@ -200,7 +195,7 @@ open class Tabs: View {
if orientation == .horizontal && fillContainer {
tabStackView.distribution = .fillEqually
} else {
tabStackView.distribution = .fillProportionally
tabStackView.distribution = orientation == .horizontal ? .fillProportionally : .fill
}
tabStackView.axis = orientation == .horizontal ? .horizontal : .vertical
@ -217,6 +212,7 @@ open class Tabs: View {
tabItem.orientation = orientation
tabItem.surface = surface
tabItem.indicatorPosition = indicatorPosition
tabItem.accessibilityLabel = "\(tabItem.text) \(tabItem.selected ? "selected" : "unselected") \(index+1) of \(tabItems.count)"
}
// Deactivate old constraint