LPStatusBarBackgroundColor-swift 1.0.1

LPStatusBarBackgroundColor-swift 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2016
SPMSupports SPM

Maintained by litt1e-p.



  • By
  • litt1e-p

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

Release Notes

  • 1.0.0

License

MIT