Comments (4)
我目前也遇到这个问题啊,求解!
from ltnavigationbar.
from ltnavigationbar.
在 #37 还是不能解决问题。
我的是自定义一个naviBar,默认是不显示背影,上拉后淡出。
我的解决方法:
if (IS_iOS10) {
naviBar.translucent = YES;
[naviBar lt_setBackgroundColor:[UIColor clearColor]];
}
文件UINavigationBar+Awesome.h 里面的方法lt_setBackgroundColor 要是下面的:
- (void)lt_setBackgroundColor:(UIColor *)backgroundColor
{
if (!self.overlay) {
[self setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
self.overlay = [[UIView alloc] initWithFrame:CGRectMake(0, -20, [UIScreen mainScreen].bounds.size.width, CGRectGetHeight(self.bounds) + 20)];
self.overlay.userInteractionEnabled = NO;
self.overlay.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
[self insertSubview:self.overlay atIndex:0];
}
self.overlay.backgroundColor = backgroundColor;
}
from ltnavigationbar.
issues里有人提过这个问题,据说新版v2.1.7解决了,不过我这边尝试透明时还是显示白色。
后来仿照了美团app,直接隐藏了_UINavigationBarBackground(iOS9)或_UIBarBackground(iOS10)这个view,背景自然就透明了,然后自定义了个view,放在导航栏下面,通过设置view的背景色来达到每个控制器导航栏颜色不同的需求。
from ltnavigationbar.
Related Issues (20)
- _UINavigationBarBackIndicatorView 造成自定义的返回按钮与默认返回按钮同时显示 HOT 1
- 为什么我在使用的时候navigationBar在下拉的时候,颜色由透明变成蓝色的时候,左右按钮都被导航栏的颜色覆盖了?这是为什么呢?求解 HOT 1
- A back button is shown on left side of navigation.
- 问题多多哦 HOT 1
- Crashed on iOS11 HOT 2
- Swift3.0,使用cocoaPods怎么添加?
- iOS 11 崩溃 HOT 2
- “UINavigationItemView” 私有API被禁了, 上架被拒 HOT 1
- 您好,使用了您的框架结果被拒 HOT 2
- iOS11,UINavigationBar拿不到self.subviews了,如何解决? HOT 1
- iOS11 beta版环境下crash
- iOS11 无法获取_titleView HOT 7
- 调用私有api审核被拒审
- 适配iPhone X的导航条显示不全 HOT 3
- 由于iOS11导航栏图层改变产生的问题 HOT 3
- 通过这样判断适配iPhonex导航栏高度显示问题 HOT 1
- 下拉刷新的时候 左右导航按钮会跟着动画,从左到右加载
- 适配iOS11 iPhone X 需要做的 HOT 1
- iOS12 lt_setBackgroundColor can't set navigationBar Color? HOT 1
- 这么好用的库不维护可惜了啊,试用了其他几个都好复杂 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ltnavigationbar.