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.92k stars 1.46k forks source link

[bug]:在lottie和selectedCover配合使用下,在隐藏selectedCover后item上会出现一个白色图片 #480

Closed iimuy closed 4 years ago

iimuy commented 4 years ago

iOS 系统13.3.1 1、正常情况 image 2、selectedCover的显示 image 3、在隐藏selectedCover之后出现了问题 image 4、查看图层多了UITabBarSwappableImageView image 目前我的解决方法是,在显示selectedCover,隐藏UITabBarSwappableImageView

- (void)setSelectedCoverShow:(BOOL)show {
    UIControl *selectedTabButton = [self.viewControllers[0].tabBarItem cyl_tabButton];
    [selectedTabButton cyl_replaceTabButtonWithNewView:self.selectedCover
                                                  show:show];
    //解决隐藏selectedCover后,会有一个白色图片出现的问题
    selectedTabButton.cyl_tabImageView.hidden = YES;
    if (show) {
        [self addScaleAnimationOnView:self.selectedCover.imageView repeatCount:1];
    }
}
ChenYilong commented 4 years ago

查看最新demo,发现你说的情况无法复现.不加上面的隐藏代码,也能正常显示