测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | 2017年5月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Michal Jach 维护。
使用 Swift 3 编写的 iOS 状态栏通知。易于更改 UIStatusBar 的外观和文本。
要运行示例项目,请克隆仓库,然后首先在 Example 目录中运行 pod install
。
StatusBarNotifications 可通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "StatusBarNotifications"
首先导入 StatusBarNotifications
import StatusBarNotifications
然后在您想要显示通知的任何地方简单地调用 show 方法
StatusBarNotifications.show(withText: "Hello from StatusBar!", animation: .slideFromTop)
您可以设置每个通知的自定义背景颜色和文本颜色
StatusBarNotifications.show(withText: "Hello from StatusBar!", animation: .slideFromTop, backgroundColor: .red, textColor: .white)
.fade
.slideFromTop
.slideFromBottom
.slideFromLeft
Michal Jach, [email protected]
StatusBarNotifications 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。