Easy to use in app notification library for your app.
let notification = NotificationBuilder
.setTheme(NotificationType.error)
.setTitle("💀 Error")
.setSubtitle("Something bad happened")
.isDismissable()
.setPrimaryButton(text: "Report", action: {})
.setSecondaryButton(text: "Close", action: {})
.setTimeout(20_000)
.showIcon()
.setCompletionHandler(completion: { (type) in
switch type{
case .closeTapped:
// action
break
case .primaryButtonTapped:
// action
break
case .secondaryButtonTapped:
// action
break
case .timeoutReached:
// action
break
case .swipeUp:
// action
break
}
})
.build()
notification.show()