ETNavBarTransparent

Change NavigationBar's transparency at pop gestrue and other situation

Github星跟踪图

ETNavBarTransparent

Change NavigationBar's transparency at pop gestrue and other situation

Animation

image

Installation

Add the following line to your Podfile:

pod 'ETNavBarTransparent'

Then, run the following command:

$ pod install

Or, simply drag ETNavBarTransparent.swift to your project.

Usage

Change NavigationBar's transparency and tintColor where you want:

// Example:
// Change in viewDidLoad
override func viewDidLoad() {
    super.viewDidLoad()

    self.navBarBgAlpha = 0
    self.navBarTintColor = .white
}

// Change in scrollView scroll
func scrollViewDidScroll(_ scrollView: UIScrollView) {

    if scrollView.contentOffset.y > 100 {
        navBarBgAlpha = 1
        navBarTintColor = UIColor.defaultNavBarTintColor()
    } else {
        navBarBgAlpha = 0
        navBarTintColor = .white
    }

}

导航栏的平滑显示和隐藏 - 个人页的自我修养(1)

License

MIT license. See LICENSE for details.

Contact

Follow and contact me on Weibo @日光镇 or My Blog

主要指标

概览
名称与所有者EnderTan/ETNavBarTransparent
主编程语言Swift
编程语言Swift (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2017-03-07 08:47:37
推送于2019-07-17 10:24:59
最后一次提交2019-07-17 18:23:43
发布数16
最新版本名称1.1.3 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数775
关注者数18
派生数89
提交数52
已启用问题?
问题数33
打开的问题数11
拉请求数3
打开的拉请求数3
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?