CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

ZKStatusBarNotification 1.2

ZKStatusBarNotification 1.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by WangWenzhuang.



  • By
  • WangWenzhuang




可以在 iOS App 状态栏很容易的显示消息通知。

error
info
info

实现功能

  • 显示情景消息
  • 自定义(情景背景色、字体颜色、字体、自动消失间隔秒)

运行环境

  • iOS 8.0 +
  • Xcode 8 +
  • Swift 3.0 +

安装

手动安装

  • 拖动 ZKStatusBarNotification 文件夹到您的项目

快速使用

导入 ZKStatusBarNotification

import ZKStatusBarNotification

显示情景 -> 信息

ZKStatusBarNotification.showInfo("Star 一下吧")

显示情景 -> 成功

ZKStatusBarNotification.showSuccess("操作成功")

显示情景 -> 错误

ZKStatusBarNotification.showError("出现错误了")

自定义显示样式

设置字体

ZKStatusBarNotification.setFont(_ font: UIFont)

设置字体颜色

ZKStatusBarNotification.setTextColor(_ color: UIColor)

设置情景 -> 信息背景颜色

ZKStatusBarNotification.setInfoBackgroundColor(_ color: UIColor)

设置情景 -> 出错背景颜色

ZKStatusBarNotification.setErrorBackgroundColor(_ color: UIColor)

设置情景 -> 成功背景颜色

ZKStatusBarNotification.setErrorBackgroundColor(_ color: UIColor)

设置自动隐藏时间

ZKStatusBarNotification.setAutoDismissDelay(_ delay: Int)