具有提示和横幅样式的通知 UI。用户可以在通知内回复消息。
添加处理器
NotificationBar.shared.selectHandler = { [weak self] _ in
guard let sSelf = self else { return }
}
NotificationBar.shared.sendHandler = { [weak self] (text) in
guard let sSelf = self else { return }
print(text)
}
显示通知
NotificationBar.share.showNotification(title: "Notification", message: "Message", style: .banner)
NotificationBar.share.showNotification(title: "Notification", message: "Message", style: .alert)