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.9k stars 1.45k forks source link

[bug]:iOS15在切换到某些vc后有可能出现TabBar变透明的情况 #574

Closed yuyedaidao closed 2 years ago

yuyedaidao commented 2 years ago



Base Info for this issue

  1. Version:Latest Version as here
  2. Language of App :Objective-C/Swift
  3. iOS System Version:iOS12
  4. Prototype(是否是真机):YES
  5. 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


ChenYilong commented 2 years ago

https://github.com/ChenYilong/CYLTabBarController/issues/573#issuecomment-930986448

yuyedaidao commented 2 years ago

@ChenYilong 跟573不一样,他是设置backgroundImage,我是默认设置,没有设置backgroundImage

yuyedaidao commented 2 years ago

iOS15 TabBar的视图结构跟之前的版本不太一样

542604974 commented 2 years ago

亲测是可以,但我导航栏还是有BUG,跟FD的滑动手势冲突了,暂时没办法解决,standardAppearance.backgroundImageContentMode = UIViewContentModeScaleAspectFit;设置这个就可以了,

yuyedaidao commented 2 years ago

通过kvo检测透明度的改变然后强制修正回来

my-lsk commented 2 years ago

亲测是可以,但我导航栏还是有BUG,跟FD的滑动手势冲突了,暂时没办法解决,standardAppearance.backgroundImageContentMode = UIViewContentModeScaleAspectFit;设置这个就可以了,

if (@available(iOS 15.0, *)) {
   self.tabBar.backgroundColor = [UIColor whiteColor];
}

加这句话就可以了,和FD没冲突, 也不用设置standardAppearance.backgroundImageContentMode = UIViewContentModeScaleAspectFit

yuyedaidao commented 2 years ago

@my-lsk 你这加上岂不会影响模糊效果,除非你们就是设计的白色背景

my-lsk commented 2 years ago

@my-lsk 你这加上岂不会影响模糊效果,除非你们就是设计的白色背景

是的,我们是白色背景 image