-
Notifications
You must be signed in to change notification settings - Fork 606
Open
Description
I migrated from CocoaPods 2.8 to SPM 2.9 and tab bar items gone.
Here is how I init controller based on ESTabBarController:
let imageSize = CGSize(width: 1, height: 1)
tabBar.isTranslucent = false
tabBar.backgroundImage = UIImage(color: .white, size: imageSize)
tabBar.shadowImage = UIImage(color: UIColor(hex: 0xF2F2F2)!, size: imageSize)
shouldHijackHandler = { tabbarController, viewController, index in
if index == 1 {
return true
}
return false
}
didHijackHandler = { tabbarController, viewController, index in
Analytics.logEvent(.tabAdd)
self.addPressed()
}
let vc1 = UIStoryboard(name: "Home", bundle: nil).instantiateInitialViewController()!
vc1.tabBarItem = ESTabBarItem(TabBarItemContentView(), title: nil, image: #imageLiteral(resourceName: "tab-home"), selectedImage: nil)
let vc2 = UIViewController()
vc2.tabBarItem = ESTabBarItem(addTabBarItemContentView, title: nil, image: #imageLiteral(resourceName: "tab-add"), selectedImage: nil)
let vc3 = UIStoryboard(name: "Profile", bundle: nil).instantiateInitialViewController()!
vc3.tabBarItem = ESTabBarItem(TabBarItemContentView(), title: nil, image: #imageLiteral(resourceName: "tab-profile"), selectedImage: nil)
viewControllers = [LTNavigationController(rootViewController: vc1),
vc2,
LTNavigationController(rootViewController: vc3)]
TabBarItemContentView modifies only colors
How to fix it?
Metadata
Metadata
Assignees
Labels
No labels

