ViewControllers for the 8th and higher tabs are not displayed in the elevated Tab Bar. However, I am able to select these tabs both in the Tab Bar and the side bar.
func setTabs(){
let colors = [UIColor.red,.systemGray6,.green,.systemMint,.cyan,.yellow,.blue,.magenta]
var tabs = [UITab]()
let range = 0...10
for index in range {
if #available(iOS 18.0, *) {
let tab = UITab(title: "Tab_\(index)", image: UIImage(systemName: "globe"), identifier: "tab__\(index)", viewControllerProvider: {tab in
let vc = UIViewController()
vc.view.backgroundColor = colors[index%colors.count]
return vc
})
tabs.append(tab)
}
}
tabbarController.setTabs(tabs, animated: true)
}