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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?