ESTabBarController
ESTabBarController copied to clipboard
自定义tabBar只使用lottie的animationView并且是navgationVC的时候
trafficstars
├── UITabBarController └──── UINavigationController └────── UIViewController 这样的结构布局,tabBar是空白的,如果 ├── UITabBarController └────── UIViewController 这样的结构就没有问题,麻烦知道告诉下原因,谢谢
来个demo,我帮你看一下,理论上这个框架是不关心tabbar和navigation层级的,因为在开发的时候这个地方花了最大精力来设计
我也发现了这个问题
let tabBarController = ESTabBarController()
let v1 = HabitVC()
let v2 = CountDownVC()
let v3 = MineVC()
v1.tabBarItem = ESTabBarItem.init(BaseContentView(), title: nil, image: UIImage(named: "tab_home_nor"), selectedImage: UIImage(named: "tab_home_hi"))
v2.tabBarItem = ESTabBarItem.init(BaseContentView(), title: nil, image: UIImage(named: "tab_chat_nor"), selectedImage: UIImage(named: "tab_chat_hi"))
v3.tabBarItem = ESTabBarItem.init(LottieContentView(), title: nil, image: nil, selectedImage: nil)
let nav1 = UINavigationController.init(rootViewController: v1)
let nav2 = UINavigationController.init(rootViewController: v2)
let nav3 = UINavigationController.init(rootViewController: v3)
tabBarController.viewControllers = [nav1, nav2, nav3]
return tabBarController
这样的话tabbar上的Lottie就不显示了