Latest0.0.2
Homepagehttps://github.com/MaximKotliar/Bartinter
LicenseMIT
Platformsios 9.0
Authors

Version
License
Platform

Status bar apperance manager that make your status bar readable by dynamically changing it’s color depending on content behind.

alt tag

Installation

Add

pod 'Bartinter'

to your podfile, and run
pod install

Usage

Set "View controller-based status bar appearance" (UIViewControllerBasedStatusBarAppearance) to YES in your Info.plist.
Set ViewController’s updatesStatusBarAppearanceAutomatically = true

That’s it.

Swizzling

By default, bartinter swizzles a couple methods for your convenience. (see: UIKitSwizzling.swift)
If you are not ok with method swizzling, you can disable it by following line:

Bartinter.isSwizzlingEnabled = false

Without swizzling you need to do some things manually:

Firstly, you need to provide childViewControllerForStatusBarStyle, in your ViewController subclass just add following:

override var childViewControllerForStatusBarStyle: UIViewController? {
    return statusBarUpdater
}

Secondly, you need de decide, when you need to refresh status bar style, for example on tableView scroll, so add:

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    statusBarUpdater?.refreshStatusBarStyle()
}

Latest podspec

{
    "name": "Bartinter",
    "version": "0.0.2",
    "summary": "Automatically manages Status Bar color depending on context behind it",
    "swift_version": "4.1",
    "homepage": "https://github.com/MaximKotliar/Bartinter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Maxim Kotliar": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/MaximKotliar/Bartinter.git",
        "tag": "0.0.2"
    },
    "source_files": "Bartinter/Source/**/*.{h,m,swift}"
}

Pin It on Pinterest

Share This