MIT License

项目介绍

MaximKotliar/Bartinter 是一个托管在 GitHub 上的开源项目,主要使用 Swift 编写,采用 MIT License 许可证,目前获得 1.7k 个 Star、83 次 Fork。

仓库全名
MaximKotliar/Bartinter
开源许可证
MIT License
Star 数
1.7k
Fork 数
83
未关闭 Issue
6

README 摘要

Bartinter Status bar apperance manager that make your status bar readable by dynamically changing it's color depending on content behind. Installation Add to your podfile, and run 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Bartinter 用什么语言开发?

主要使用 Swift 编写,采用 MIT License 许可证,目前有 1.7k 个 Star。

Bartinter 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Bartinter 的源码?

可以直接克隆仓库:git clone https://github.com/MaximKotliar/Bartinter.git,默认分支为 master;安装与运行步骤见仓库 README。

Bartinter 最近还在维护吗?

仓库最近一次更新为 6月30日,当前有 6 个未关闭 Issue;Star 数为 1.7k,可作为社区活跃度的参考。

简要分析

热度分
1883
价值分
1044
活跃状态
活跃

语言占比

Ruby
Swift

README

Awesome Version License Platform

Bartinter

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

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 to decide, when you need to refresh status bar style, for example on tableView scroll, so add:

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

评论

暂无评论