LPStatusBarBackgroundColor-swift 1.0.1

LPStatusBarBackgroundColor-swift 1.0.1

测试已测试
语言语言 SwiftSwift
许可 MIT
发布最后发布2016年7月
SPM支持 SPM

litt1e-p维护。



  • 作者:
  • litt1e-p

LPStatusBarBackgroundColor

通过运行时和 Swift 动态改变 UIStatusBar 的 backgroundColor

安装

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

附加说明

Objective C 版本在这里:这里

用法

//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

截图

发布说明

  • 1.0.0

许可

MIT