首先不太确定具体bug原因,但是经过测试发现通过下面修改就没问题了,如下:
CYLTabBar.m Line:186 修改为[self setupTabImageViewDefaultOffset:self.selectedItem.cyl_tabButton]即可
这里不明白为啥作者写法self.tabBarButtonArray[0],一直取第一个导致非第一个tabbar会设置tabImageViewDefaultOffset。
ps:以上只是个人粗略查看修改测试,不一定就是问题所在,可能碰巧而已,还是辛苦作者赶紧修复bug。
另外又看了后面的一些issue,发现这段代码是可以解决文字消失的,我想应该是需要设置一下默认状态下的 textAttributes.
解决方法
if (@available(iOS 13.0, *)) {
UITabBarAppearance *standardAppearance = [[UITabBarAppearance alloc] init];
UITabBarItemAppearance *inlineLayoutAppearance = [[UITabBarItemAppearance alloc] init];
[inlineLayoutAppearance.normal setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10], NSForegroundColorAttributeName:RGB(169, 181, 208)}];
[inlineLayoutAppearance.selected setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10], NSForegroundColorAttributeName:CclearBlue(1)}];
standardAppearance.stackedLayoutAppearance = inlineLayoutAppearance;
standardAppearance.backgroundColor = [UIColor whiteColor];
standardAppearance.shadowImage = [UIImage imageWithColor:CpaleGrey(1)];
self.tabBar.standardAppearance = standardAppearance;
}