Skip to content
New issue

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

navigationBar.isTranslucent = true,页面背景色不同时跳转,会有闪烁 #163

Open
yuanyedehuhuan opened this issue May 13, 2021 · 4 comments

Comments

@yuanyedehuhuan
Copy link

测试前提条件:
1、navigationBar.isTranslucent = true
2、导航栏背景色设置为 navigationController?.navigationBar.barTintColor = .white 或者 navigationController?.navigationBar.setBackgroundImage(UIColor.white.toUIImage(), for: .default)。其他颜色也可以如 UIColor.cyan
3、页面背景色设置为和导航栏不同的颜色,如绿色
现象是,push过程中导航栏颜色是 isTranslucent = false 的状态,push完成时瞬间变成透明的

@GKWenBo
Copy link

GKWenBo commented Aug 27, 2021

同问,楼主解决了吗

@ieliwb
Copy link

ieliwb commented Sep 1, 2022

@yuanyedehuhuan @GKWenBo 2位大佬解决了吗

@zifeizhang
Copy link

测试前提条件:
1、navigationBar.isTranslucent = true
2、导航栏背景色设置为 navigationController?.navigationBar.barTintColor = .white 或者 navigationController?.navigationBar.setBackgroundImage(UIColor.white.toUIImage(), for: .default)。其他颜色也可以如 UIColor.cyan
3、页面背景色设置为和导航栏不同的颜色,如绿色
现象是,push过程中导航栏颜色是 isTranslucent = false 的状态,push完成时瞬间变成透明的

设置导航透明度为不透明就可以了

@ieliwb
Copy link

ieliwb commented Feb 1, 2023

测试前提条件:
1、navigationBar.isTranslucent = true
2、导航栏背景色设置为 navigationController?.navigationBar.barTintColor = .white 或者 navigationController?.navigationBar.setBackgroundImage(UIColor.white.toUIImage(), for: .default)。其他颜色也可以如 UIColor.cyan
3、页面背景色设置为和导航栏不同的颜色,如绿色
现象是,push过程中导航栏颜色是 isTranslucent = false 的状态,push完成时瞬间变成透明的

设置导航透明度为不透明就可以了

这样的话导航栏半透明效果就没了,挺纠结的,没有更好的解决方法吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants