Giter Club home page Giter Club logo

Comments (4)

iHTCboy avatar iHTCboy commented on July 27, 2024

我目前也遇到这个问题啊,求解!

from ltnavigationbar.

langhua9527 avatar langhua9527 commented on July 27, 2024

#37

from ltnavigationbar.

iHTCboy avatar iHTCboy commented on July 27, 2024

#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;
}

@al1020119

from ltnavigationbar.

zwind007 avatar zwind007 commented on July 27, 2024

issues里有人提过这个问题,据说新版v2.1.7解决了,不过我这边尝试透明时还是显示白色。
后来仿照了美团app,直接隐藏了_UINavigationBarBackground(iOS9)或_UIBarBackground(iOS10)这个view,背景自然就透明了,然后自定义了个view,放在导航栏下面,通过设置view的背景色来达到每个控制器导航栏颜色不同的需求。

from ltnavigationbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.