-
-
Notifications
You must be signed in to change notification settings - Fork 242
TabBar layout ignores vertical separators width #563
Copy link
Copy link
Closed
Description
New Issue Checklist
- Updated Tabman to the latest version
- I took a look at the Troubleshooting Guide
- I searched for existing GitHub issues
Issue Description
When using separators in TabBar (TMConstrainedHorizontalBarLayout), the inner stack view is applying a width constraint on both items and separators, ignoring the separator's width.
This results in button items and separators having the same width, which is not the intended behavior.
This can easily be reproduced by changing provided example with this snippet in TabViewController.swift instead of ButtonBar in viewDidLoad
// Create a bar
let bar = TMBarView.TabBar()
// Customize bar properties including layout and other styling.
bar.layout.contentInset = UIEdgeInsets(top: 0.0, left: 16.0, bottom: 4.0, right: 16.0)
// bar.layout.interButtonSpacing = 24.0
// bar.indicator.weight = .light
// bar.indicator.cornerStyle = .eliptical
bar.fadesContentEdges = true
bar.spacing = 16.0
bar.layout.separatorWidth = 1
bar.layout.showSeparators = true
bar.buttons.customize {
$0.tintColor = UIColor.tabmanForeground.withAlphaComponent(0.4)
$0.selectedTintColor = .tabmanForeground
if #available(iOS 11, *) {
$0.adjustsFontForContentSizeCategory = true
}
}
bar.indicator.tintColor = .tabmanForeground
// Add bar to the view - as a .systemBar() to add UIKit style system background views.
addBar(bar.systemBar(), dataSource: self, at: .top)Other useful things
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
