Skip to content
 
 

Repository files navigation

(logo)

ZKStatusBarNotification

license build CocoaPods platform

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

error info info

实现功能

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

运行环境

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

安装

CocoaPods

你可以使用 CocoaPods 安装 ZKStatusBarNotification,在你的 Podfile 中添加:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'ZKStatusBarNotification'
end

如果使用 Swift 3.2 请使用1.1版本

pod 'ZKStatusBarNotification', '1.1'

手动安装

  • 拖动 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)

About

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

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages