Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
qweluke opened this issue Jan 17, 2023 · 1 comment
Open
3 tasks done

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

qweluke opened this issue Jan 17, 2023 · 1 comment

Comments

@qweluke
Copy link

qweluke commented Jan 17, 2023

New Issue Checklist

Issue Description

image

I'd like to:

  • put Spacer() between each tab so they fill all of the space
  • add left padding before "Today's top 10" so it's not so close to the phone edge
  • add right padding before "Search" so it's not so close to the phone edge
  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
Copy link

akaakoz commented Sep 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants