uias / Tabman

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

how to change tabbar title after the add of addbar ? #587

Open Appuniverse304 opened 3 years ago

Appuniverse304 commented 3 years ago

"addBar(bar.systemBar(), dataSource: self, at: .bottom)"

after this I want to update my baritem title

djdance commented 2 years ago

I've made it so:

var titles:[String] = ["title1",...]
...
    func barItem(for bar: TMBar, at index: Int) -> TMBarItemable {
        return TMBarItem(title: titles[index])
    }
...
titles[0] = "changed!"
self.reloadData()