uias / Tabman

™️ A powerful paging view controller with interactive indicator bars
https://uias.github.io/Tabman
MIT License
2.84k stars 235 forks source link

How to add Spacer() between the tabs? #610

Open qweluke opened 1 year ago

qweluke commented 1 year ago

New Issue Checklist

Issue Description

image

I'd like to:

  override func viewDidLoad() {
    super.viewDidLoad()

    dataSource = self

    let bar = TMBarView.ButtonBar()

    bar.buttons.customize {
      $0.tintColor = UIColor(Color.theme.accent)
      $0.selectedTintColor = UIColor(Color.theme.accent)
      $0.font = UIFont(name: "ComicSans-Regular", size: 16)!
      $0.selectedFont = UIFont(name: "ComicSans-Regular", size: 16)!

    }

    let systemBar = bar.systemBar();
    systemBar.backgroundStyle = .flat(color: UIColor(Color.red))
    systemBar.separatorColor = .clear

    addBar(systemBar, dataSource: self, at: .top)
  }
akaakoz commented 12 months ago

@qweluke Does adding bar.layout.contentMode = .fit solve your problem?