Latest 0.3.0
Homepage https://github.com/cuzv/CHXHiddenNavigationBarTransition
License MIT
Platforms ios 8.0, requires ARC
Authors

Deal with navigation bar and status bar animation when some page set navigation bar hidden or change status bar style.

ViewController preferredStatusBarStyle() 设置生效的前置条件

  • Info.plis -> View controller-based status bar appearance -> YES
  • navigationBarHidden = true

NavigationBar 没有隐藏的时候设置 preferredStatusBarStyle 无效。
NavigationBar 隐藏后才会根据 preferredStatusBarStyle 来更新状态栏

override preferredStatusBarStyle 记得调用 super

 override func preferredStatusBarStyle() -> UIStatusBarStyle {
        super.preferredStatusBarStyle()
        return .Default
 }

注意:不要覆盖该方法,请直接使用 chx_prefersdStatusBarStyle 属性.

Latest podspec

{
    "name": "CHXHiddenNavigationBarTransition",
    "version": "0.3.0",
    "license": "MIT",
    "summary": "Deal with navigation bar and status bar animation when some page set navigation bar hidden or change status bar style.",
    "homepage": "https://github.com/cuzv/CHXHiddenNavigationBarTransition",
    "authors": {
        "Moch Xiao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cuzv/CHXHiddenNavigationBarTransition.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This