ChenYilong / CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
MIT License
6.91k stars 1.45k forks source link

如何push一个UITabBarController? #135

Closed fuchenxi closed 7 years ago

fuchenxi commented 7 years ago

现在有个需求是跳转一个普通通德UITabBarController, 隐藏cyl_tabBar, 会出现问题, 而且系统的tabBarItem的image被绘制重叠的两份

ChenYilong commented 7 years ago

luohanchenyilong@163.com 发个Demo给我

fuchenxi commented 7 years ago

image被绘制两次这个问题现在没有复现, 跳转没有隐藏是我好像写错了

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {

    [super pushViewController:viewController animated:animated];
    if (self.viewControllers.count > 1) {

        self.hidesBottomBarWhenPushed = YES;
    }
}

====================================== 改为

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {

    if (self.viewControllers.count > 0) {

        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

======================================

ChenYilong commented 7 years ago

如果没有问题,可以关闭issue