Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(logo)

ZKStatusBarNotification

license CocoaPods platform contact

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

info error 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

手动安装

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

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages