要运行示例项目,首先克隆仓库,然后在 Example 目录中运行 pod install
。
appetize.io 演示 : [这里]
它是一个通知视图创建器(uiwindow)。
只需发送您的自定义视图和一些配置,然后调用 show()。
它是一个非常舒适的通知视图。
NotificationView.create(YourNotiView("hello")).show()
NotificationView.create(YourNotiView("hello")).setupDuration(present: 0.3, dismiss: 0.3, expose: 3).show()
NotificationView.create(YourNotiView("hello")).whenTouch { view in
print("third notification touched.")
}.show()
NotificationView.create(YourNotiView("hello")).whenCompletion { completed in
print("hide completion.")
}.show()
// you can choose setup methods.
NotificationView.create(YourNotiView("hello"))
.setupDuration(present: 0.3, dismiss: 0.3, expose: 3)
.whenTouch { view in
print("third notification touched.")
}.whenCompletion { completed in
print("hide completion.")
}.show()
//find last.
NotificationView.find(YourNotiView.self)?.hide()
//find all type.
NotificationView.findAll(YourNotiView.self)?.forEach({ notiview in
// do something.
})
通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod "PGNotificationView"
ipagong, [email protected]
PGNotificationView 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。