Latest 1.0.1
Homepage https://github.com/litt1e-p/LPStatusBarBackgroundColor-swift
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

LPStatusBarBackgroundColor

Change UIStatusBar backgroundColor dynamically which made via runtime & swift

Installation

pod 'LPStatusBarBackgroundColor-swift', '~> 1.0.0'

Additional

Objective C version is here

Usage

//import
import LPStatusBarBackgroundColor_swift

//set navigationBar's backgroundImage with height 44

navigationController!.navigationBar.setBackgroundImage(UIImage.imageWithColor(yourColor, size: CGSizeMake(
UIScreen.mainScreen().bounds.size.width
, 44)), forBarPosition: UIBarPosition.Any, barMetrics: UIBarMetrics.Default)

/** in navigationController */
self.navigationBar.statusBarBackgroundColor = UIColor.blackColor() //any color you want

/** in navigationController's rootViewController */
self.navigationController?.navigationBar.statusBarBackgroundColor = UIColor.brownColor //any color you want

Screenshot

LPStatusBarBackgroundColor-swift

Release Notes

  • 1.0.0

License

MIT

Latest podspec

{
    "name": "LPStatusBarBackgroundColor-swift",
    "version": "1.0.1",
    "summary": "change UIStatusBar's backgroundColor.",
    "description": "change UIStatusBar backgroundColor dynamically which made via runtime.",
    "homepage": "https://github.com/litt1e-p/LPStatusBarBackgroundColor-swift",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "litt1e-p": "[email protected]"
    },
    "source": {
        "git": "https://github.com/litt1e-p/LPStatusBarBackgroundColor-swift.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "LPStatusBarBackgroundColor/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This