ETNavBarTransparent

Change NavigationBar's transparency at pop gestrue and other situation

Github stars Tracking Chart

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

Main metrics

Overview
Name With OwnerEnderTan/ETNavBarTransparent
Primary LanguageSwift
Program languageSwift (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2017-03-07 08:47:37
Pushed At2019-07-17 10:24:59
Last Commit At2019-07-17 18:23:43
Release Count16
Last Release Name1.1.3 (Posted on )
First Release Name1.0.0 (Posted on )
用户参与
Stargazers Count775
Watchers Count18
Fork Count89
Commits Count52
Has Issues Enabled
Issues Count33
Issue Open Count11
Pull Requests Count3
Pull Requests Open Count3
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private