We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIControl+CYLTabBarControllerExtention 中 cyl_tabImageView
在工程demo MainTabBarController.h中
- (void)tabBarController:(UITabBarController *)tabBarController didSelectControl:(UIControl *)control 这个地方代码 animationView = [control cyl_tabImageView];
如果当前 TabbarItem 是选中状态 点击之后可以获取 animationView,如果当前TabbarItem是未选中状态 点击获取到animationView 值为nil,在iOS12上表现正常。
应该都能获取到才是正常的。在iOS12下都可以正常获取到
最新版本上就可以复现
iOS13下 - (UIImageView *)cyl_tabImageView { for (UIImageView *subview in self.subviews) { if ([subview cyl_isTabImageView]) { return (UIImageView *)subview; } } return nil; } 当前未选中的情况 (lldb) po self.subviews <__NSArrayM 0x6000026de130>( <UIVisualEffectView: 0x7fe6054956c0; frame = (0 0; 93.75 48); userInteractionEnabled = NO; layer = <CALayer: 0x6000028962a0>> clientRequestedContentView effect=<UIVibrancyEffect: 0x600002a3ce30> style=UIBlurEffectStyleSystemChromeBackground vibrancyStyle=_UIVibrancyEffectStyleFill, <LOTAnimationView: 0x7fe605547220; frame = (29.6667 7; 22 22); userInteractionEnabled = NO; layer = <CALayer: 0x600002875fc0>> ) 当前选中的情况 (lldb) po self.subviews <__NSArrayM 0x6000026d9ce0>( <UIVisualEffectView: 0x7fe6054956c0; frame = (0 0; 93.75 48); userInteractionEnabled = NO; layer = <CALayer: 0x6000028962a0>> clientRequestedContentView effect=<UIVibrancyEffect: 0x600002a3ce30> style=UIBlurEffectStyleSystemChromeBackground vibrancyStyle=_UIVibrancyEffectStyleFill, <LOTAnimationView: 0x7fe605547220; frame = (29.6667 7; 22 22); userInteractionEnabled = NO; layer = <CALayer: 0x600002875fc0>>, <UITabBarSwappableImageView: 0x7fe6054954d0; frame = (29.6667 7; 22 22); hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x600002896240>>, <UITabBarButtonLabel: 0x7fe605495230; frame = (30.3333 30.6667; 20.6667 12); text = '首页'; opaque = NO; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x600000ba93b0>> )
The text was updated successfully, but these errors were encountered:
这个问题在看了,有什么好的建议欢迎加微信聊chenyilong1010
现在请暂时通过下面的方式解决: 这Demo中:
- (void)customizeTabBarAppearance:(CYLTabBarController *)tabBarController {
添加如下代码:
if (@available(iOS 13.0, *)) { [UITabBar appearance].barTintColor = [UIColor whiteColor];// or other color }
或者:
[[UITabBar appearance] setBackgroundImage:[[self class] imageWithColor: [UIColor whiteColor] size:CGSizeMake([UIScreen mainScreen].bounds.size.width, tabBarController.tabBarHeight ?: (CYL_IS_IPHONE_X ? 65 : 40))]];
if (@available(iOS 10.0, *)) { [[UITabBar appearance] setUnselectedItemTintColor:[UIColor grayColor]]; }
Sorry, something went wrong.
除了上述的办法,也可以直接升级到 v1.27.0,详情见:
#386
No branches or pull requests
Base Info for this issue
UIControl+CYLTabBarControllerExtention 中 cyl_tabImageView
Bug
1. How to reproduce the problem.
在工程demo MainTabBarController.h中
如果当前 TabbarItem 是选中状态 点击之后可以获取 animationView,如果当前TabbarItem是未选中状态 点击获取到animationView 值为nil,在iOS12上表现正常。
2. Please help me in this way.
应该都能获取到才是正常的。在iOS12下都可以正常获取到
3. Here is a Demo.
最新版本上就可以复现
4. Here is my Debug log
The text was updated successfully, but these errors were encountered: