
Я хочу автоматически изменить размеры элементов в соответствии с номером UITabBarItem.Тем не менее, размер элемента не регулируется автоматически.Я хотел бы иметь два элемента, заполненных панелью вкладок, три из них заполнены панелью вкладок.
В настоящее время панель вкладок содержит элемент, но панель вкладок не заполнена, поскольку размер постоянен.

let tabBar = MDCTabBar(frame: CGRect(x: 0, y: 88, width: 414, height: 40))
override func viewDidLoad() {
super.viewDidLoad()
configureTabBar()
}
func configureTabBar() {
tabBar.items = [
UITabBarItem(title: "one", image: .none, tag: 0),
UITabBarItem(title: "two", image: .none, tag: 0),
]
tabBar.itemAppearance = .titledImages
tabBar.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin]
tabBar.sizeToFit()
tabBar.tintColor = UIColor.red
tabBar.barTintColor = UIColor.white
tabBar.rippleColor = UIColor.red
tabBar.bottomDividerColor = UIColor.lightGray
tabBar.unselectedItemTintColor = UIColor.gray
tabBar.selectedItemTintColor = UIColor.red
view.addSubview(tabBar)
}
Какие параметры мне нужно добавить, чтобы элемент заполнял панель вкладок, как в примере на вкладке Компоненты материала