可以在 iOS App 状态栏很容易的显示消息通知。
- 显示情景消息
- 自定义(情景背景色、字体颜色、字体、自动消失间隔秒)
- iOS 8.0 +
- Xcode 8 +
- Swift 3.0 +
你可以使用 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文件夹到您的项目
import ZKStatusBarNotificationZKStatusBarNotification.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)


