Notifire 2.0

Notifire 2.0

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2020年12月
SPM支持 SPM

farhad faramarzi 维护。



  • 作者:
  • Farhad Faramarzi

Notifire

描述

Notifire 是一个 iOS 消息视图库。它非常灵活。并且是用 Swift 编写的。

消息视图可以在屏幕顶部显示,在状态栏上方或下方显示,以及在导航栏前方显示。有一个可交互的关闭手势。如果您愿意,可以降低背景亮度。还有更多功能!

此库提供了一个易于使用的类来显示通知视图。有两种类型(介绍、错误、警告)。

新特性

当 Notifire 完成时,您可以处理一个闭包

最后插入此代码以显示通知消息

    Notifire.shared.show(type: .error, message: "this is a test") {
        // you can insert your task 
        print("finish")
    }

演示

安装

Notifire 在 Cocoapods 上可用

pod "Notifire"

如何使用

首先必须导入 Notifire。

 import Notifire

如果您想更改字体,最好在 appDelegate 中设置它

 Notifire.shared.title.font = UIFont(name: "tahoma", size: 12)!
 Notifire.shared.title.textAlignment = .center
 
 // for change text color
 Notifire.shared.color = .white

最后插入此代码以显示通知消息

 Notifire.shared.show(type: .error, message: "this is a message")

许可证

Notifire 采用 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。