AutomaticStatusBarColor 2.0.0

AutomaticStatusBarColor 2.0.0

测试已测试
Lang语言 SwiftSwift
许可证 MIT
Released最后发布2018年11月
SPM支持 SPM

Victor Carmouze 维护。



  • 作者:
  • Victor Carmouze

AutomaticStatusBarColor

CI Status Version License Platform

描述

AutomaticStatusBarColor 是一个轻量级的零行组件,用于在您的应用程序中自动管理状态栏颜色

示例

要运行示例项目,首先克隆仓库,然后从 Example 目录中运行 pod install

需求

安装

AutomaticStatusBarColor 可以通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 中

pod 'AutomaticStatusBarColor'

最新 Swift 4 版本

2.0.0

最新 Swift 3 版本

1.0.1

用法

第一步

将以下行添加到您的 info.plist 中:基于视图控制器状态栏外观,并选择值 不接受

基本用法

AutomaticStatusBarColor 被设计成可以在不编写任何代码的情况下通过所有应用程序。

但,如果您希望有一些控制,您可以通过 UIViewController 扩展访问 AutomaticStatusBarColor 的配置方法

为单个控制器禁用

只需点击方法 disableAutomaticStatusBarColor

disableAutomaticStatusBarColor()

手动选择状态栏颜色

如果您不喜欢结果或想手动控制,可以为单个控制器选择状态栏颜色。

force(statusBarStyle: .lightContent)

导航栏

如果您打算使用导航栏,请在 super.viewWillAppear(:) 之前隐藏或显示它。

作者

Victor Carmouze, [email protected]

许可

AutomaticStatusBarColor 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。