CYLTabBarController
CYLTabBarController copied to clipboard
[bug]:xcode11 build 的iOS13下 图片下移或者无法点击
首先不太确定具体bug原因,但是经过测试发现通过下面修改就没问题了,如下:
CYLTabBar.m Line:186 修改为[self setupTabImageViewDefaultOffset:self.selectedItem.cyl_tabButton]即可
这里不明白为啥作者写法self.tabBarButtonArray[0],一直取第一个导致非第一个tabbar会设置tabImageViewDefaultOffset。
ps:以上只是个人粗略查看修改测试,不一定就是问题所在,可能碰巧而已,还是辛苦作者赶紧修复bug。
Base Info for this issue
- Version:Latest Version as here
- Language of App :Objective-C/Swift
- iOS System Version:iOS12
- Prototype(是否是真机):YES
- Issue Type:Crash、Bug、Enhancement(希望能支持一个新需求)、Q-A
1. How to reproduce the problem.
2. Please help me in this way.
3. Here is a Demo.
4. Here is my Debug log
遇到同样的问题,除第一个tabBarItem外,其他选项在push新页面后pop回来,标题文字会消失。请问如何设置
遇到同样的问题,除第一个tabBarItem外,其他选项在push新页面后pop回来,标题文字会消失。请问如何设置
我又看了后面的一些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;
}
遇到同样的问题,除第一个tabBarItem外,其他选项在push新页面后pop回来,标题文字会消失。请问如何设置
我是pop回来后,所有tabBarItem的标题文字都消失了
遇到同样的问题,除第一个tabBarItem外,其他选项在push新页面后pop回来,标题文字会消失。请问如何设置
我又看了后面的一些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; }
你这个是对的
我也遇到了
+1
1.28.4遇到
关于pop回来tabBaritem 文字消失的问题.查看一下使用的版本,升级到最新的1.29.0就可以解决了.
1.29.0版本遇到同样问题,按照你们方法设置后文字怎么变成...了?
因为其他的Bug.我已经不用这个库了.
------------------ 原始邮件 ------------------ 发件人: "haolizi"<[email protected]>; 发送时间: 2020年9月4日(星期五) 下午5:02 收件人: "ChenYilong/CYLTabBarController"<[email protected]>; 抄送: "鸳鸯语丶"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [ChenYilong/CYLTabBarController] [bug]:xcode11 build 的iOS13下 图片下移或者无法点击 (#439)
1.29.0版本遇到同样问题,按照你们方法设置后文字怎么变成...了?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
你现在用的哪个?
我自己自定义的.没用三方库
------------------ 原始邮件 ------------------ 发件人: "haolizi"<[email protected]>; 发送时间: 2020年9月4日(星期五) 下午5:07 收件人: "ChenYilong/CYLTabBarController"<[email protected]>; 抄送: "鸳鸯语丶"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [ChenYilong/CYLTabBarController] [bug]:xcode11 build 的iOS13下 图片下移或者无法点击 (#439)
你现在用的哪个?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
那应该是库里,item 的label宽度给写死了吧
------------------ 原始邮件 ------------------ 发件人: "haolizi"<[email protected]>; 发送时间: 2020年9月4日(星期五) 下午5:26 收件人: "ChenYilong/CYLTabBarController"<[email protected]>; 抄送: "鸳鸯语丶"<[email protected]>; "Comment"<[email protected]>; 主题: Re: [ChenYilong/CYLTabBarController] [bug]:xcode11 build 的iOS13下 图片下移或者无法点击 (#439)
找到原因了,只要设置文字大小就会...,比如:normalAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:11]; 不设置就能正常显示
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
我遇到了这个问题,目前只是找到我项目中不展示tabbarItem的title原因 tabbar.navVC.rootVC 的title不能进行设置,包括 @"" 空字符串,否则就会显示为空。 我项目中这么设置是为了二级返回按钮不展示title。 暂时没有查到具体原因,也实在是没想明白页面的title和tabbar有什么关系